Boost Azure Demo
This commit is contained in:
82
docker-compose.prod-a.yaml
Normal file
82
docker-compose.prod-a.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
services:
|
||||
caddy-prod-a:
|
||||
image: caddy:2-alpine
|
||||
container_name: caddy-prod-a
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
BASE_DOMAIN: ${BASE_DOMAIN}
|
||||
FRONTEND_UPSTREAM: frontend-prod-a:3000
|
||||
BACKEND_UPSTREAM: backend-prod-a:8081
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile.prod-a:/etc/caddy/Caddyfile:ro
|
||||
- BoostAI_caddy_data_prod_a:/data
|
||||
- BoostAI_caddy_config_prod_a:/config
|
||||
depends_on:
|
||||
backend-prod-a:
|
||||
condition: service_healthy
|
||||
frontend-prod-a:
|
||||
condition: service_started
|
||||
|
||||
backend-prod-a:
|
||||
image: boost-ai/demo-backend-prod-a:${PROD_A_TAG:-latest}
|
||||
container_name: backend-prod-a
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./.env.prod-a
|
||||
environment:
|
||||
GO_ENV: production
|
||||
BACKEND_INTERNAL_PORT: 8081
|
||||
ALLOWED_ORIGINS: http://${BASE_DOMAIN},https://${BASE_DOMAIN}
|
||||
DATABASE_URL: postgres://boostai:${POSTGRES_PASSWORD}@postgres-prod-a:5432/boostai?sslmode=disable
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
SESSION_COOKIE_NAME: ${SESSION_COOKIE_NAME:-boostai_session}
|
||||
depends_on:
|
||||
postgres-prod-a:
|
||||
condition: service_healthy
|
||||
expose:
|
||||
- "8081"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8081/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 15s
|
||||
|
||||
frontend-prod-a:
|
||||
image: boost-ai/demo-frontend-prod-a:${PROD_A_TAG:-latest}
|
||||
container_name: frontend-prod-a
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
HOST: 0.0.0.0
|
||||
PORT: 3000
|
||||
NITRO_HOST: 0.0.0.0
|
||||
NITRO_PORT: 3000
|
||||
ALLOWED_HOSTS: ${BASE_DOMAIN}
|
||||
__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS: ${BASE_DOMAIN}
|
||||
expose:
|
||||
- "3000"
|
||||
|
||||
postgres-prod-a:
|
||||
image: postgres:16-alpine
|
||||
container_name: postgres-prod-a
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: boostai
|
||||
POSTGRES_USER: boostai
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- BoostAI_postgres_prod_a_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U boostai -d boostai"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
BoostAI_postgres_prod_a_data:
|
||||
BoostAI_caddy_data_prod_a:
|
||||
BoostAI_caddy_config_prod_a:
|
||||
Reference in New Issue
Block a user