-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose.yml
69 lines (66 loc) · 1.45 KB
/
docker-compose.yml
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
x-custom:
app:
- &rails_env "development"
- &redis_cache_url "${REDIS_CACHE_URL:-redis://redis:6379/0}"
postgres:
- &postgres_user "${DATABASE_USERNAME:-postgres}"
- &postgres_password "${DATABASE_PASSWORD:-password}"
services:
nginx-proxy:
image: nginx:1.21
volumes:
- ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./etc/nginx/conf.d:/etc/nginx/conf.d
environment:
TZ: Asia/Tokyo
ports:
- 3000:80
links:
- app
depends_on:
- app
app:
image: decidim-cfj
build:
context: ./
args:
RAILS_ENV: *rails_env
volumes:
- .:/app
- node_modules:/app/node_modules
- rails-tmp:/app/tmp
# exclude volumes
- /app/vendor
- /app/log
- /app/.git
environment:
PORT: 3000
DATABASE_HOST: pg
DATABASE_USERNAME: *postgres_user
DATABASE_PASSWORD: *postgres_password
RAILS_ENV: *rails_env
REDIS_URL: *redis_cache_url
REDIS_CACHE_URL: *redis_cache_url
links:
- pg
- redis
pg:
image: "ghcr.io/codeforjapan/postgresql_bigm:12-latest"
volumes:
- pg-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: *postgres_user
POSTGRES_PASSWORD: *postgres_password
ports:
- 5433:5432
redis:
image: redis
ports:
- 6379:6379
volumes:
- redis-data:/data
volumes:
node_modules: {}
pg-data: {}
redis-data: {}
rails-tmp: {}