version: '3.8'
services:
florachain.api:
build:
dockerfile: Dockerfile
context: .
# Only will build development stage from our dockerfile
target: development
volumes:
- .:/usr/src/app
env_file:
- .env
# Run a command against the development stage of the image
command: npm run start:dev
ports:
- 6545:6545
networks:
- nesjs-network
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- florachain-redis:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
db:
image: postgres
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- '5432:5432'
networks:
- nesjs-network
volumes:
- florachain-postgres:/var/lib/postgresql/data
postgis:
image: postgis/postgis
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data
ports:
- '5433:5433'
networks:
- nesjs-network
pgadmin:
image: dpage/pgadmin4
restart: always
depends_on:
- db
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- 8080:80
networks:
- nesjs-network
networks:
nesjs-network:
volumes:
florachain-redis:
driver: local
florachain-postgres:
driver: local