Skip to content

Commit d532775

Browse files
committed
Move docker compose to postgis image
1 parent a0acf7c commit d532775

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

.docker/.env.dist

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ GID=1000
99
# Software versions.
1010
PHP_VERSION=8.4
1111
GEOSOP_VERSION=3.13.1
12-
POSTGRES_VERSION=17
13-
POSTGIS_VERSION=3
12+
POSTGRES_POSTGIS_VERSION=17-3.5
1413

1514
# Paths.
1615
SOURCES_PATH=/app

.docker/compose.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,15 @@ services:
3232
- no-new-privileges
3333
postgres:
3434
container_name: ${COMPOSE_PROJECT_NAME}-postgres
35-
build:
36-
context: postgres
37-
args:
38-
- POSTGRES_VERSION
39-
- POSTGIS_VERSION
35+
image: postgis/postgis:${POSTGRES_POSTGIS_VERSION}-alpine
4036
environment:
4137
- POSTGRES_USER=${POSTGRES_USER}
4238
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
4339
working_dir: /var/lib/postgresql/data
4440
cap_drop:
4541
- ALL
4642
cap_add:
43+
- CHOWN
4744
- DAC_OVERRIDE
4845
- SETGID
4946
- SETUID

.docker/postgres/Dockerfile

-6
This file was deleted.

phpunit-bootstrap.php

-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ function getRequiredEnv(string $name): string
134134
],
135135
);
136136

137-
$pdo->exec('CREATE EXTENSION IF NOT EXISTS postgis;');
138-
139137
$driver = new PdoPgsqlDriver($pdo);
140138
$engine = new PostgisEngine($driver);
141139

0 commit comments

Comments
 (0)