coolify/docker-compose.prod.yml

62 lines
1.5 KiB
YAML
Raw Normal View History

2023-04-12 21:23:32 +02:00
version: '3.8'
services:
coolify:
2023-04-27 13:08:22 +02:00
image: "ghcr.io/coollabsio/coolify:${APP_TAG:-4.0.0-nightly.0}"
2023-04-13 15:48:27 +02:00
container_name: coolify
2023-04-27 12:09:41 +02:00
volumes:
2023-04-28 11:00:21 +02:00
- type: bind
source: /data/coolify/source/.env
target: /var/www/html/.env
read_only: true
2023-04-27 12:11:22 +02:00
- /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
2023-04-12 21:23:32 +02:00
environment:
2023-04-13 15:48:27 +02:00
- 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
ports:
- "${APP_PORT:-8000}:80"
2023-04-28 11:06:55 +02:00
expose:
- "${APP_PORT:-8000}"
healthcheck:
test: curl --fail http://localhost:80/api/health || exit 1
interval: 4s
retries: 5
timeout: 2s
2023-04-13 15:48:27 +02:00
depends_on:
postgres:
condition: service_healthy
2023-04-12 21:23:32 +02:00
postgres:
2023-04-13 15:48:27 +02:00
container_name: coolify-db
volumes:
2023-04-27 15:16:24 +02:00
- coolify-db:/var/lib/postgresql/data
2023-04-12 21:23:32 +02:00
environment:
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
POSTGRES_DB: "${DB_DATABASE}"
2023-04-13 15:48:27 +02:00
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USERNAME}",
"-d",
"${DB_DATABASE}"
]
2023-04-27 15:26:43 +02:00
interval: 2s
2023-04-13 15:48:27 +02:00
retries: 5
timeout: 2s
2023-04-27 15:16:24 +02:00
volumes:
coolify-db:
name: coolify-db