lasthourcloud/docker-compose.prod.yml
2023-05-09 15:45:24 +02:00

63 lines
1.5 KiB
YAML

version: '3.8'
services:
coolify:
image: "ghcr.io/coollabsio/coolify:${APP_TAG:-4.0.0-nightly.0}"
container_name: coolify
volumes:
- type: bind
source: /data/coolify/source/.env
target: /var/www/html/.env
read_only: true
- /data/coolify/deployments:/var/www/html/storage/app/deployments
- /data/coolify/ssh-keys:/var/www/html/storage/app/ssh-keys
- /data/coolify/proxy:/var/www/html/storage/app/proxy
environment:
- APP_ENV=production
- APP_DEBUG
- APP_NAME
- APP_KEY
- APP_URL
- DB_CONNECTION
- DB_HOST
- DB_PORT
- DB_DATABASE
- DB_USERNAME
- DB_PASSWORD
- QUEUE_CONNECTION
- SSL_MODE=off
- PHP_PM_CONTROL=dynamic
ports:
- "${APP_PORT:-8000}:80"
expose:
- "${APP_PORT:-8000}"
healthcheck:
test: curl --fail http://localhost:80/api/health || exit 1
interval: 4s
retries: 5
timeout: 2s
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: coolify-db
volumes:
- coolify-db:/var/lib/postgresql/data
environment:
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_DB: "${DB_DATABASE}"
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USERNAME}",
"-d",
"${DB_DATABASE}"
]
interval: 2s
retries: 5
timeout: 2s
volumes:
coolify-db:
name: coolify-db