Update docker-compose
This commit is contained in:
parent
578fa1837b
commit
b6f62844bd
@ -1,33 +1,72 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
backend:
|
||||||
image: postgres:15
|
build: ./backend
|
||||||
container_name: recipes-postgres
|
container_name: recipes-backend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
POSTGRES_USER: recipes_user
|
|
||||||
POSTGRES_PASSWORD: Aa123456
|
|
||||||
POSTGRES_DB: recipes_db
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "8000:8000"
|
||||||
volumes:
|
environment:
|
||||||
- pgdata:/var/lib/postgresql/data
|
# Database Configuration (RDS)
|
||||||
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql:ro
|
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
|
||||||
|
DB_USER: ${DB_USER}
|
||||||
|
DB_PASSWORD: ${DB_PASSWORD}
|
||||||
|
DB_NAME: ${DB_NAME}
|
||||||
|
DB_HOST: ${DB_HOST}
|
||||||
|
DB_PORT: ${DB_PORT:-5432}
|
||||||
|
|
||||||
pgadmin:
|
# Email Configuration
|
||||||
image: dpage/pgadmin4:8
|
SMTP_HOST: ${SMTP_HOST}
|
||||||
container_name: recipes-pgadmin
|
SMTP_PORT: ${SMTP_PORT:-587}
|
||||||
|
SMTP_USER: ${SMTP_USER}
|
||||||
|
SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||||
|
SMTP_FROM: ${SMTP_FROM}
|
||||||
|
|
||||||
|
# Google OAuth
|
||||||
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
||||||
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
||||||
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
|
||||||
|
|
||||||
|
# Microsoft Azure OAuth
|
||||||
|
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID}
|
||||||
|
AZURE_CLIENT_SECRET: ${AZURE_CLIENT_SECRET}
|
||||||
|
AZURE_TENANT_ID: ${AZURE_TENANT_ID:-consumers}
|
||||||
|
AZURE_REDIRECT_URI: ${AZURE_REDIRECT_URI}
|
||||||
|
|
||||||
|
# Frontend URL
|
||||||
|
FRONTEND_URL: ${FRONTEND_URL}
|
||||||
|
|
||||||
|
# Cloudflare R2 Backup Configuration
|
||||||
|
R2_ENDPOINT: ${R2_ENDPOINT}
|
||||||
|
R2_ACCESS_KEY: ${R2_ACCESS_KEY}
|
||||||
|
R2_SECRET_KEY: ${R2_SECRET_KEY}
|
||||||
|
|
||||||
|
# Backup Schedule
|
||||||
|
BACKUP_INTERVAL: ${BACKUP_INTERVAL:-weekly}
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- ./backups:/app/backups
|
||||||
|
- ./restores:/app/restores
|
||||||
|
networks:
|
||||||
|
- recipes-network
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build: ./frontend
|
||||||
|
container_name: recipes-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
|
||||||
PGADMIN_DEFAULT_EMAIL: admin@dvirlabs.com
|
|
||||||
PGADMIN_DEFAULT_PASSWORD: Aa123456
|
|
||||||
ports:
|
ports:
|
||||||
- "5050:80"
|
- "80:80"
|
||||||
|
environment:
|
||||||
|
VITE_API_URL: ${VITE_API_URL:-http://localhost:8000}
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- backend
|
||||||
|
networks:
|
||||||
|
- recipes-network
|
||||||
|
|
||||||
volumes:
|
networks:
|
||||||
pgdata:
|
recipes-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user