57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: postgres_db
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: todo
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
users-auth-service:
|
|
build:
|
|
context: ./users-auth-service
|
|
container_name: users-auth-service
|
|
restart: always
|
|
depends_on:
|
|
- postgres
|
|
environment:
|
|
PORT: 4000
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: postgres
|
|
DB_PASSWORD: postgres
|
|
DB_NAME: todo
|
|
JWT_SECRET: super_secret_key
|
|
JWT_EXPIRES_IN: 3600s
|
|
ports:
|
|
- "4000:4000"
|
|
|
|
tasks-projects-service:
|
|
build:
|
|
context: ./tasks-projects-service
|
|
container_name: tasks-projects-service
|
|
restart: always
|
|
depends_on:
|
|
- postgres
|
|
- users-auth-service
|
|
environment:
|
|
PORT: 5000
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: postgres
|
|
DB_PASSWORD: postgres
|
|
DB_NAME: todo
|
|
JWT_SECRET: super_secret_key
|
|
ports:
|
|
- "5000:5000"
|
|
|
|
volumes:
|
|
pgdata:
|