init commit. Skeleton prepared
This commit is contained in:
105
docker-compose.yml
Normal file
105
docker-compose.yml
Normal file
@@ -0,0 +1,105 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
container_name: postgres
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./infra/db/init:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-postgres}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 40
|
||||
|
||||
gateway:
|
||||
image: nginx:alpine
|
||||
container_name: gateway
|
||||
depends_on:
|
||||
- auth
|
||||
- profiles
|
||||
- match
|
||||
- chat
|
||||
- payments
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- ./infra/gateway/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
|
||||
auth:
|
||||
build:
|
||||
context: ./services/auth
|
||||
container_name: marriage_auth
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: ${AUTH_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "${AUTH_PORT:-8001}:8000"
|
||||
command: ./docker-entrypoint.sh
|
||||
|
||||
profiles:
|
||||
build:
|
||||
context: ./services/profiles
|
||||
container_name: marriage_profiles
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: ${PROFILES_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "${PROFILES_PORT:-8002}:8000"
|
||||
command: ./docker-entrypoint.sh
|
||||
|
||||
match:
|
||||
build:
|
||||
context: ./services/match
|
||||
container_name: marriage_match
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: ${MATCH_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "${MATCH_PORT:-8003}:8000"
|
||||
command: ./docker-entrypoint.sh
|
||||
|
||||
chat:
|
||||
build:
|
||||
context: ./services/chat
|
||||
container_name: marriage_chat
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: ${CHAT_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "${CHAT_PORT:-8004}:8000"
|
||||
command: ./docker-entrypoint.sh
|
||||
|
||||
payments:
|
||||
build:
|
||||
context: ./services/payments
|
||||
container_name: marriage_payments
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: ${PAYMENTS_DATABASE_URL}
|
||||
depends_on:
|
||||
- postgres
|
||||
ports:
|
||||
- "${PAYMENTS_PORT:-8005}:8000"
|
||||
command: ./docker-entrypoint.sh
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in New Issue
Block a user