-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
75 lines (71 loc) · 1.85 KB
/
docker-compose.dev.yml
File metadata and controls
75 lines (71 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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: