-
Notifications
You must be signed in to change notification settings - Fork 71
/
docker-compose.yml
113 lines (106 loc) · 2.59 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
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
103
104
105
106
107
108
109
110
111
112
113
x-app: &default-app
build:
context: "."
target: "app"
args:
- "RAILS_ENV=${RAILS_ENV:-production}"
- "NODE_ENV=${NODE_ENV:-production}"
- "RUBY_VERSION=3.1.2"
- "NODE_VERSION=16.17.1-r0"
- "YARN_VERSION=1.22.19-r0"
env_file:
- ".env"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
tty: true
volumes:
- "${DOCKER_WEB_VOLUME:-./public:/app/public}"
services:
postgres:
deploy:
resources:
limits:
cpus: "${DOCKER_POSTGRES_CPUS:-0}"
memory: "${DOCKER_POSTGRES_MEMORY:-0}"
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
# POSTGRES_DB: "${POSTGRES_DB}"
image: "postgres:15.0-alpine"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
volumes:
- "postgres:/var/lib/postgresql/data"
profiles: ["postgres"]
redis:
deploy:
resources:
limits:
cpus: "${DOCKER_REDIS_CPUS:-0}"
memory: "${DOCKER_REDIS_MEMORY:-0}"
image: "redis:7.0.5-alpine"
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
volumes:
- "redis:/data"
profiles: ["redis"]
web:
<<: *default-app
depends_on:
- "postgres"
- "redis"
environment:
VITE_RUBY_HOST: vite
deploy:
resources:
limits:
cpus: "${DOCKER_WEB_CPUS:-0}"
memory: "${DOCKER_WEB_MEMORY:-0}"
ports:
- "${DOCKER_WEB_PORT_FORWARD:-127.0.0.1:3000}:${PORT:-3000}"
profiles: ["web"]
worker:
<<: *default-app
depends_on:
- "postgres"
- "redis"
command: "bundle exec sidekiq -C config/sidekiq.yml"
entrypoint: []
deploy:
resources:
limits:
cpus: "${DOCKER_WORKER_CPUS:-0}"
memory: "${DOCKER_WORKER_MEMORY:-0}"
profiles: ["worker"]
cable:
<<: *default-app
depends_on:
- "postgres"
- "redis"
command: "puma -p 28080 cable/config.ru"
entrypoint: []
deploy:
resources:
limits:
cpus: "${DOCKER_CABLE_CPUS:-0}"
memory: "${DOCKER_CABLE_MEMORY:-0}"
ports:
- "${DOCKER_CABLE_PORT_FORWARD:-127.0.0.1:28080}:28080"
profiles: ["cable"]
vite:
<<: *default-app
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "3s"
tty: true
command: "yarn dev"
ports:
- "3036:3036"
- "3037:3037"
volumes:
- .:/app
environment:
VITE_RUBY_HOST: 0.0.0.0
profiles: ["assets"]
volumes:
postgres: {}
redis: {}