-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
85 lines (79 loc) · 2.14 KB
/
docker-compose.dev.yml
File metadata and controls
85 lines (79 loc) · 2.14 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
version: '3.8'
services:
app:
build:
context: ./
dockerfile: Dockerfile
container_name: app # Explicitly name the app container
env_file:
- './env/.env.dev.local.app'
volumes:
- ./scripts:/home/galaxy_game/scripts
- ./galaxy_game:/home/galaxy_game
- ./data/json-data:/home/galaxy_game/app/data
- ./data/maps:/home/galaxy_game/app/data/maps
- ./data/tilesets:/home/galaxy_game/app/data/tilesets
- ./data/geotiff:/home/galaxy_game/app/data/geotiff
- ./data/bundle:/usr/local/bundle # cache bundle install
- ./data/node_modules:/home/galaxy_game/node_modules # Assuming you might have Node.js assets
- ./data/logs:/home/galaxy_game/log
- tmp:/home/galaxy_game/tmp
depends_on:
redis:
condition: service_started
db:
condition: service_started
web:
extends: app
container_name: web
command: bash -c "rm -f tmp/pids/server.pid && rails server -b '0.0.0.0'"
ports:
- "3000:3000"
workers:
extends: app
container_name: sidekiq
command: bash -c "bundle install; bundle exec sidekiq -C config/sidekiq.yml"
stdin_open: true
tty: true
redis:
image: redis:alpine
container_name: redis
command: redis-server
ports:
- "6379:6379"
volumes:
- redis_data:/var/lib/redis/data
restart: unless-stopped
healthcheck:
test: redis-cli -h redis ping
interval: 30s
timeout: 3s
retries: 3
env_file:
- './env/.env.redis' # Load Redis env vars
db:
image: postgres:16
container_name: db
environment:
POSTGRES_PASSWORD: password # Keep this here as well for simplicity
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres", "-U", "postgres"]
interval: 30s
timeout: 3s
retries: 3
env_file:
- './env/.env.db' # Load DB env vars
memcached:
image: bitnami/memcached
container_name: memcached
ports:
- "11211"
volumes:
redis_data:
postgres_data:
tmp: