mirror of
https://github.com/czhu12/canine.git
synced 2025-12-16 16:35:10 -06:00
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
x-shared-env: &shared-env
|
|
DATABASE_URL: postgres://postgres:password@postgres:5432
|
|
BOOT_MODE: local
|
|
SECRET_KEY_BASE: a38fcb39d60f9d146d2a0053a25024b9
|
|
APP_HOST: http://localhost:${PORT:-3000}
|
|
LOCAL_MODE_PASSWORDLESS: true
|
|
ALLOWED_HOSTNAME: "*"
|
|
|
|
services:
|
|
postgres:
|
|
restart: unless-stopped
|
|
image: postgres:16-bookworm@sha256:878977a5fe8d75ba7eab7610e4cf7e0c8626a683d89b3f9da965b8ceba952a09
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_MULTIPLE_DATABASES=canine_production,canine_development
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- "postgres:/var/lib/postgresql/data"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 30s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
web:
|
|
restart: unless-stopped
|
|
image: ghcr.io/caninehq/canine:latest
|
|
# Overrides default command so things don't shut down after the process ends.
|
|
# command: sleep infinity
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
stdin_open: true
|
|
tty: true
|
|
ports:
|
|
- "${PORT:-3000}:${PORT:-3000}"
|
|
- "3200:3200"
|
|
environment:
|
|
<<: *shared-env
|
|
PORT: ${PORT:-3000}
|
|
ACCOUNT_SIGN_IN_ONLY: "true"
|
|
volumes:
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
|
|
|
|
worker:
|
|
restart: unless-stopped
|
|
image: ghcr.io/caninehq/canine:latest
|
|
command: bundle exec good_job start
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
<<: *shared-env
|
|
LOCAL_MODE: "true"
|
|
volumes:
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
|
|
|
|
volumes:
|
|
postgres:
|