-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (96 loc) · 2.68 KB
/
docker-compose.yml
File metadata and controls
102 lines (96 loc) · 2.68 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: "3.9"
services:
# PostgreSQL Database
database:
image: postgres:16-alpine
restart: unless-stopped
ports:
- "5433:5432" # Map to 5433 to avoid conflicts
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: miru_web_development
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Rails Application
app:
build:
context: .
dockerfile: .devcontainer/Dockerfile
target: development
command: bash -c "rm -f tmp/pids/server.pid && bundle install && bundle exec rails db:prepare && bundle exec falcon serve --bind http://0.0.0.0:3000"
ports:
- "8080:3000" # Map to 8080 as requested
working_dir: /app
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
- node_modules:/app/node_modules
environment:
DATABASE_URL: postgres://postgres:postgres@database:5432/miru_web_development
DB_HOST: database
DB_USER: postgres
DB_PASS: postgres
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
RAILS_ENV: development
RAILS_LOG_TO_STDOUT: "true"
SECRET_KEY_BASE: development_secret_key_base_at_least_30_characters_long
BUNDLE_PATH: /usr/local/bundle
PIDFILE: /tmp/pids/server.pid
DISPLAY: ":99"
CHROME_BIN: /usr/bin/chromium
depends_on:
database:
condition: service_healthy
stdin_open: true
tty: true
tmpfs:
- /tmp/pids/
# Vite Dev Server for frontend assets
vite:
build:
context: .
dockerfile: .devcontainer/Dockerfile
target: development
command: bash -c "pnpm install && pnpm vite dev --host 0.0.0.0 --port 3036"
ports:
- "3036:3036"
working_dir: /app
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
NODE_ENV: development
depends_on:
- database
# Solid Queue Background Jobs Worker
worker:
build:
context: .
dockerfile: .devcontainer/Dockerfile
target: development
command: bundle exec rake solid_queue:start
working_dir: /app
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
environment:
DATABASE_URL: postgres://postgres:postgres@database:5432/miru_web_development
DB_HOST: database
DB_USER: postgres
DB_PASS: postgres
RAILS_ENV: development
BUNDLE_PATH: /usr/local/bundle
SECRET_KEY_BASE: development_secret_key_base_at_least_30_characters_long
depends_on:
database:
condition: service_healthy
volumes:
postgres_data:
bundle_cache:
node_modules: