docker-compose.yml
version: "3.8"
services:
client:
build:
context: ./client
dockerfile: Dockerfile
ports:
- "${CLIENT_SERVICE_PORT}:3000"
container_name: landgriffon-client
command: develop
user: "5000:5000"
volumes:
- ./client:/opt/landgriffon-client/
env_file: ${ENVFILE}
api:
build:
context: ./api
dockerfile: Dockerfile
ports:
- "${API_SERVICE_PORT}:3000"
container_name: landgriffon-api
command: develop
user: "5000:5000"
volumes:
- ./api/src:/opt/landgriffon-api/src
- ./api/test:/opt/landgriffon-api/test
env_file: ${ENVFILE}
environment:
- DB_HOST=postgresql
- DB_USERNAME=${API_POSTGRES_USERNAME}
- DB_PASSWORD=${API_POSTGRES_PASSWORD}
- DB_DATABASE=${API_POSTGRES_DATABASE}
- QUEUE_HOST=redis
- DB_CACHE_HOST=redis
- GEOCODING_CACHE_HOST=redis
- JWT_SECRET=${API_AUTH_JWT_SECRET}
depends_on:
- postgresql
- redis
tiler:
container_name: landgriffon-tiler
build:
context: ./tiler
env_file: ${ENVFILE}
environment:
- API_URL=${API_URL}
- API_PORT=${API_PORT}
- S3_BUCKET_URL=${S3_BUCKET_URL}
ports:
- "${TILER_SERVICE_PORT}:4000"
volumes:
- ./tiler:/opt/landgriffon-tiler/data/local-dev
restart: unless-stopped
redis:
build:
context: ./redis
dockerfile: Dockerfile
hostname: redis
container_name: landgriffon-redis
command: [ "redis-server" ]
ports:
- "${API_REDIS_SERVICE_PORT}:6379"
restart: on-failure
# Admin gui for redis
redis-commander:
image: rediscommander/redis-commander
hostname: redis-commander
container_name: landgriffon-redis-commander
restart: always
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- '${REDIS_COMMANDER_PORT}:8081'
depends_on:
- redis
postgresql:
build:
context: database
args:
- PG_H3_VERSION=3.7.2
container_name: landgriffon-postgresql
env_file: ${ENVFILE}
ports:
- ${API_POSTGRES_PORT}:5432
volumes:
- landgriffon-postgresql:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${API_POSTGRES_PASSWORD}
- POSTGRES_USER=${API_POSTGRES_USERNAME}
- POSTGRES_DB=${API_POSTGRES_DATABASE}
restart: on-failure
volumes:
landgriffon-postgresql: