chg: pkg: make compatible the whole project with bare metal AND with docker #4
This commit is contained in:
69
compose.yaml
Normal file
69
compose.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "10080:80"
|
||||
environment:
|
||||
SERVER_NAME: ${SERVER_NAME:-:80}
|
||||
APP_ENV: prod
|
||||
APP_SECRET: ${APP_SECRET}
|
||||
DATABASE_URL: >-
|
||||
postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?serverVersion=${POSTGRES_VERSION}&charset=utf8
|
||||
POSTGRES_URL: db
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
MERCURE_URL: http://localhost/.well-known/mercure
|
||||
MERCURE_PUBLIC_URL: https://${PUBLIC_HOSTNAME:-localhost}/.well-known/mercure
|
||||
MERCURE_JWT_SECRET: ${MERCURE_JWT_SECRET}
|
||||
MERCURE_JWT_TOKEN: ${MERCURE_JWT_TOKEN}
|
||||
MERCURE_SUBSCRIBER_JWT: ${MERCURE_SUBSCRIBER_JWT}
|
||||
MAILER_DSN: smtp://mail:25?verify_peer=0
|
||||
RECAPTCHA_SITE_KEY: ${RECAPTCHA_SITE_KEY}
|
||||
RECAPTCHA_SECRET_KEY: ${RECAPTCHA_SECRET_KEY}
|
||||
WEBAUTHN_RP_ID: ${WEBAUTHN_RP_ID:-localhost}
|
||||
WEBAUTHN_ORIGIN: ${WEBAUTHN_ORIGIN:-https://localhost}
|
||||
volumes:
|
||||
- app_var:/app/var
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
mail:
|
||||
condition: service_started
|
||||
mail:
|
||||
image: boky/postfix:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
ALLOWED_SENDER_DOMAINS: ${MAIL_DOMAIN:-localhost}
|
||||
# Optional: set a relay host if you need to forward to an external SMTP
|
||||
# RELAYHOST: "[smtp.example.com]:587"
|
||||
volumes:
|
||||
- postfix_spool:/var/spool/postfix
|
||||
db:
|
||||
image: postgres:${POSTGRES_VERSION:-latest}-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
ports:
|
||||
- "15432:5432"
|
||||
volumes:
|
||||
app_var:
|
||||
postgres_data:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
postfix_spool:
|
||||
Reference in New Issue
Block a user