mirror of
https://github.com/czhu12/canine.git
synced 2026-05-24 14:19:21 -05:00
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
x-shared-env: &shared-env
|
|
DATABASE_URL: postgres://postgres:password@postgres:5432
|
|
BOOT_MODE: local
|
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-devsecret}
|
|
APP_HOST: http://localhost:${PORT:-3000}
|
|
LOCAL_MODE_PASSWORDLESS: true
|
|
REMAP_LOCALHOST: "host.docker.internal"
|
|
ALLOWED_HOSTNAME: "*"
|
|
|
|
services:
|
|
postgres:
|
|
restart: unless-stopped
|
|
image: postgres:16-bookworm@sha256:878977a5fe8d75ba7eab7610e4cf7e0c8626a683d89b3f9da965b8ceba952a09
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=password
|
|
- POSTGRES_MULTIPLE_DATABASES=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
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
stdin_open: true
|
|
tty: true
|
|
ports:
|
|
- "${PORT:-3000}:${PORT:-3000}"
|
|
- "3200:3200"
|
|
environment:
|
|
<<: *shared-env
|
|
PORT: ${PORT:-3000}
|
|
BINDING: "0.0.0.0"
|
|
ACCOUNT_SIGN_IN_ONLY: "true"
|
|
volumes:
|
|
- .:/rails
|
|
- bundle:/usr/local/bundle
|
|
- node_modules:/rails/node_modules
|
|
- /rails/tmp
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
|
|
|
|
worker:
|
|
restart: unless-stopped
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
command: bundle exec good_job start
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
<<: *shared-env
|
|
LOCAL_MODE: "true"
|
|
volumes:
|
|
- .:/rails
|
|
- bundle:/usr/local/bundle
|
|
- node_modules:/rails/node_modules
|
|
- /rails/tmp
|
|
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
|
|
|
|
volumes:
|
|
postgres:
|
|
bundle:
|
|
node_modules:
|