mirror of
https://github.com/sergeyyarkov/educt.git
synced 2026-10-11 02:09:06 +03:00
101 lines
2.1 KiB
YAML
101 lines
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
nginx:
|
|
container_name: nginx
|
|
restart: always
|
|
image: nginx:latest
|
|
volumes:
|
|
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- api
|
|
networks:
|
|
- app-network
|
|
client:
|
|
container_name: client
|
|
restart: always
|
|
build:
|
|
context: ./educt-client
|
|
target: production
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- 5000:5000
|
|
depends_on:
|
|
- api
|
|
networks:
|
|
- app-network
|
|
api:
|
|
container_name: api
|
|
restart: always
|
|
build:
|
|
context: ./educt-server
|
|
target: production
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- 3333:3333
|
|
environment:
|
|
- PORT=3333
|
|
- APP_KEY=IP387l45rlNO3t7Qgjd89qr-a2G4oUgz
|
|
- DB_CONNECTION=pg
|
|
- PG_HOST=postgres
|
|
- PG_PORT=5432
|
|
- PG_USER=postgres
|
|
- PG_PASSWORD=1234
|
|
- PG_DB_NAME=educt
|
|
- REDIS_CONNECTION=local
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- REDIS_PASSWORD=
|
|
- SMTP_HOST=localhost
|
|
- SMTP_PORT=587
|
|
- SMTP_USERNAME=<username>
|
|
- SMTP_PASSWORD=<password>
|
|
- MAILGUN_API_KEY=<key>
|
|
- MAILGUN_DOMAIN=<domain>
|
|
- CACHE_VIEWS=false
|
|
- DRIVE_DISK=local
|
|
- S3_KEY=<key>
|
|
- S3_SECRET=<secret>
|
|
- S3_BUCKET=<bucket>
|
|
- S3_REGION=<region>
|
|
volumes:
|
|
- uploads:/home/node/app/uploads
|
|
command: ['dumb-init', 'node', 'server.js']
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- app-network
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:14
|
|
volumes:
|
|
- postgres_volume:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: 1234
|
|
POSTGRES_DB: educt
|
|
ports:
|
|
- 5432:5432
|
|
networks:
|
|
- app-network
|
|
redis:
|
|
container_name: redis
|
|
image: redis:6-alpine
|
|
volumes:
|
|
- redis_volume:/data
|
|
ports:
|
|
- 6379:6379
|
|
networks:
|
|
- app-network
|
|
depends_on:
|
|
- postgres
|
|
volumes:
|
|
postgres_volume:
|
|
redis_volume:
|
|
uploads:
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|