Files
CoPay/docker-compose.yml
T
2024-11-17 02:31:42 +03:00

129 lines
2.4 KiB
YAML

name: hack
services:
db:
image: postgres:12
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
env_file:
- path: .env.template
required: true
- path: .env
required: false
environment:
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
adminer:
image: adminer
restart: always
ports:
- 8080:8080
networks:
- default
depends_on:
- db
environment:
- ADMINER_DESIGN=pepa-linha-dark
prestart:
build:
context: ./backend
networks:
- default
depends_on:
db:
condition: service_healthy
restart: true
command: bash scripts/prestart.sh
env_file:
- path: .env.template
required: true
- path: .env
required: false
environment:
- ENVIRONMENT=production
- DATABASE_URL=postgresql+psycopg://postgres:postgres@db:5432/postgres
bot:
restart: always
networks:
- default
depends_on:
backend:
condition: service_healthy
restart: true
env_file:
- path: .env.template
required: true
- path: .env
required: false
build:
context: ./bot
backend:
restart: always
networks:
- default
ports:
- 8000:8000
depends_on:
db:
condition: service_healthy
restart: true
prestart:
condition: service_completed_successfully
env_file:
- path: .env.template
required: true
- path: .env
required: false
environment:
- ENVIRONMENT=production
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/utils/health-check"]
interval: 10s
timeout: 5s
retries: 5
build:
context: ./backend
optimizetka:
restart: always
networks:
- default
ports:
- 3000:8000
build:
context: ./optimizetka
frontend:
restart: always
networks:
- default
ports:
- 8081:80
build:
context: ./frontend
args:
- NODE_ENV=production
env_file:
- path: .env.template
required: true
- path: .env
required: false
- path: ./frontend/.env
required: false
volumes:
app-db-data: