user/docker-compose.yml

73 lines
1.4 KiB
YAML

version: '3.8'
services:
v3-user-api:
container_name: v3-user-api
build:
dockerfile: Dockerfile
context: .
target: development
volumes:
- .:/usr/src/app
env_file:
- .env
command: npm run start:dev
ports:
- ${SERVICE_PORT:-5001}:${SERVICE_PORT:-5001}
depends_on:
- v3-user-db
networks:
v3-network:
aliases:
- v3-user-api
v3-user-redis:
container_name: v3-user-redis
image: ${REDIS_IMAGE}
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- 6501:6379
volumes:
- .redis_data:/data
env_file:
- .env
networks:
v3-network:
aliases:
- v3-user-redis
v3-user-db:
container_name: v3-user-db
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: user
POSTGRES_USER: user
POSTGRES_PASSWORD: user
ports:
- 5501:5432
volumes:
- .postgresql:/var/lib/postgresql/data:rw
networks:
v3-network:
aliases:
- v3-user-db
v3-user-db-test:
container_name: v3-user-db-test
image: ${POSTGRES_IMAGE}
environment:
POSTGRES_DB: user
POSTGRES_USER: user
POSTGRES_PASSWORD: user
ports:
- 5601:5432
networks:
v3-network:
aliases:
- v3-user-db-test
networks:
v3-network:
name: v3-network
external: true