mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 10:19:20 +03:00
45 lines
858 B
YAML
45 lines
858 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
container_name: educt-server
|
|
restart: always
|
|
build:
|
|
context: .
|
|
target: dependencies
|
|
ports:
|
|
- ${PORT}:${PORT}
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PG_HOST=postgres
|
|
- REDIS_HOST=redis
|
|
volumes:
|
|
- ./:/home/node/app
|
|
command: dumb-init node ace serve --watch
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:14
|
|
volumes:
|
|
- postgres_volume:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_USER: ${PG_USER}
|
|
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
|
POSTGRES_DB: ${PG_DB_NAME}
|
|
ports:
|
|
- 5432:5432
|
|
|
|
redis:
|
|
container_name: redis
|
|
image: redis:6-alpine
|
|
volumes:
|
|
- redis_volume:/data
|
|
ports:
|
|
- 6379:6379
|
|
volumes:
|
|
postgres_volume:
|
|
redis_volume:
|