mirror of
https://github.com/maplibre/martin.git
synced 2024-12-24 07:22:52 +03:00
79c8ccb452
Publishes Martin Docker Image to GitHub Docker Registry as [`ghcr.io/maplibre/martin`](https://ghcr.io/maplibre/martin) Closes https://github.com/maplibre/martin/issues/601 --------- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
93 lines
2.6 KiB
YAML
93 lines
2.6 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
martin:
|
|
image: ghcr.io/maplibre/martin:v0.7.0
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- DATABASE_URL=postgres://postgres:postgres@db/db
|
|
- RUST_LOG=actix_web=info,martin=debug,tokio_postgres=debug
|
|
depends_on:
|
|
- db
|
|
|
|
db-is-ready:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:14-3.3
|
|
network_mode: host
|
|
command:
|
|
- "sh"
|
|
- "-c"
|
|
- "until pg_isready -h localhost -p ${PGPORT:-5411} -U postgres; do sleep 1; done"
|
|
restart: "no"
|
|
environment:
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
- PGHOST=localhost
|
|
- PGPORT=${PGPORT:-5411}
|
|
|
|
db:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:14-3.3-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${PGPORT:-5411}:5432"
|
|
environment:
|
|
# POSTGRES_* variables are used by the postgis/postgres image
|
|
# PG_* variables are used by psql
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
|
|
|
db-ssl:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:15-3.3
|
|
command:
|
|
- "postgres"
|
|
- "-c"
|
|
- "ssl=on"
|
|
- "-c"
|
|
- "ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem"
|
|
- "-c"
|
|
- "ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${PGPORT:-5411}:5432"
|
|
environment:
|
|
# POSTGRES_* variables are used by the postgis/postgres image
|
|
# PG_* variables are used by psql
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
|
|
|
db-legacy:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:11-3.0-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${PGPORT:-5411}:5432"
|
|
environment:
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PCPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|