mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-06-03 20:13:01 +00:00
initiall commit
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
|
||||
dragonfly:
|
||||
image: docker.dragonflydb.io/dragonflydb/dragonfly:latest
|
||||
command: ["--logtostderr", "--proactor_threads=4"]
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: unless-stopped
|
||||
|
||||
mailpit:
|
||||
image: axllent/mailpit:latest
|
||||
ports:
|
||||
- "${MAILPIT_HTTP_PORT}:8025"
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/backend/Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
|
||||
DRAGONFLY_URL: redis://dragonfly:6379/0
|
||||
BACKEND_STORAGE_ROOT: /data/storage
|
||||
BACKEND_MIGRATIONS_DIR: /app/db/migrations
|
||||
VITE_APP_URL: ${VITE_APP_URL}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
dragonfly:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- backend_storage:/data/storage
|
||||
restart: unless-stopped
|
||||
|
||||
auth:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/auth/Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
|
||||
DRAGONFLY_URL: redis://dragonfly:6379/0
|
||||
BETTER_AUTH_URL: http://localhost/auth
|
||||
AUTH_BASE_URL: http://localhost/auth
|
||||
VITE_APP_URL: http://localhost
|
||||
SMTP_HOST: mailpit
|
||||
SMTP_PORT: 1025
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
dragonfly:
|
||||
condition: service_started
|
||||
mailpit:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/frontend/Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
VITE_APP_URL: http://localhost
|
||||
VITE_AUTH_BASE_URL: http://localhost/auth
|
||||
VITE_API_BASE_URL: http://localhost/api/v1
|
||||
FRONTEND_PORT: 3000
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_started
|
||||
auth:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
depends_on:
|
||||
- backend
|
||||
- auth
|
||||
- frontend
|
||||
- mailpit
|
||||
ports:
|
||||
- "${NGINX_PORT}:80"
|
||||
volumes:
|
||||
- ./infra/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
backend_storage:
|
||||
Reference in New Issue
Block a user