user/docker-compose.yml

45 lines
895 B
YAML
Raw Normal View History

2022-12-13 14:27:28 +00:00
version: '3.8'
services:
api:
container_name: ${SERVICE_CONTAINER}
build:
dockerfile: Dockerfile
context: .
target: development
volumes:
- .:/usr/src/app
env_file:
- .env
command: npm run start:dev
ports:
2022-12-15 16:14:50 +00:00
- "${SERVICE_PORT:-5001}:${SERVICE_PORT:-5001}"
2022-12-13 14:27:28 +00:00
depends_on:
- db
networks:
2022-12-15 16:14:50 +00:00
v3-network:
aliases:
- v3-user-api
2022-12-13 14:27:28 +00:00
db:
container_name: ${POSTGRES_CONTAINER}
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
2022-12-26 08:45:20 +00:00
- "${POSTGRES_PORT:-5501}:5432"
2022-12-13 14:27:28 +00:00
volumes:
2022-12-26 08:45:20 +00:00
- .postgresql:/var/lib/postgresql/data:rw
2022-12-13 14:27:28 +00:00
networks:
2022-12-15 16:14:50 +00:00
v3-network:
aliases:
- v3-user-db
2022-12-13 14:27:28 +00:00
networks:
2022-12-15 16:14:50 +00:00
v3-network:
name: v3-network
driver: bridge
2022-12-26 08:45:20 +00:00
external: true