Skip to content

Commit 8251de9

Browse files
committed
fix: adjust docker compose production to add redis
1 parent e7e2b3c commit 8251de9

1 file changed

Lines changed: 52 additions & 43 deletions

File tree

docker-compose.production.yml

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,53 @@
1-
services:
2-
api:
3-
build:
4-
context: .
5-
dockerfile: Dockerfile.production
6-
restart: unless-stopped
7-
environment:
8-
RAILS_ENV: production
9-
DATABASE_URL: ${DATABASE_URL}
10-
REDIS_URL: ${REDIS_URL}
11-
ELASTICSEARCH_URL: ${ELASTICSEARCH_URL:-http://elastic:9200}
12-
RAILS_LOG_TO_STDOUT: "true"
13-
PORT: 3000
14-
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
15-
RIOT_API_KEY: ${RIOT_API_KEY}
16-
CORS_ORIGINS: ${CORS_ORIGINS:-https://prostaff.gg,https://www.prostaff.gg,https://api.prostaff.gg}
17-
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
18-
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
19-
ports:
20-
- "3000:3000"
21-
healthcheck:
22-
test: ["CMD-SHELL", "curl -f http://localhost:3000/up || exit 1"]
23-
interval: 30s
24-
timeout: 5s
25-
retries: 3
26-
start_period: 40s
1+
services:
2+
api:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile.production
6+
restart: unless-stopped
7+
networks:
8+
- coolify
9+
environment:
10+
RAILS_ENV: production
11+
DATABASE_URL: ${DATABASE_URL}
12+
REDIS_URL: ${REDIS_URL}
13+
ELASTICSEARCH_URL: ${ELASTICSEARCH_URL:-http://elastic:9200}
14+
RAILS_LOG_TO_STDOUT: "true"
15+
PORT: 3000
16+
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
17+
RIOT_API_KEY: ${RIOT_API_KEY}
18+
CORS_ORIGINS: ${CORS_ORIGINS:-https://prostaff.gg,https://www.prostaff.g
19+
g,https://api.prostaff.gg}
20+
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
21+
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
22+
ports:
23+
- "3000:3000"
24+
healthcheck:
25+
test: ["CMD-SHELL", "curl -f http://localhost:3000/up || exit 1"]
26+
interval: 30s
27+
timeout: 5s
28+
retries: 3
29+
start_period: 40s
2730

28-
sidekiq:
29-
build:
30-
context: .
31-
dockerfile: Dockerfile.production
32-
command: bundle exec sidekiq -C config/sidekiq.yml
33-
restart: unless-stopped
34-
environment:
35-
RAILS_ENV: production
36-
DATABASE_URL: ${DATABASE_URL}
37-
REDIS_URL: ${REDIS_URL}
38-
ELASTICSEARCH_URL: ${ELASTICSEARCH_URL:-http://elastic:9200}
39-
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
40-
RIOT_API_KEY: ${RIOT_API_KEY}
41-
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
42-
depends_on:
43-
api:
44-
condition: service_healthy
31+
sidekiq:
32+
build:
33+
context: .
34+
dockerfile: Dockerfile.production
35+
command: bundle exec sidekiq -C config/sidekiq.yml
36+
restart: unless-stopped
37+
networks:
38+
- coolify
39+
environment:
40+
RAILS_ENV: production
41+
DATABASE_URL: ${DATABASE_URL}
42+
REDIS_URL: ${REDIS_URL}
43+
ELASTICSEARCH_URL: ${ELASTICSEARCH_URL:-http://elastic:9200}
44+
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
45+
RIOT_API_KEY: ${RIOT_API_KEY}
46+
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
47+
depends_on:
48+
api:
49+
condition: service_healthy
50+
51+
networks:
52+
coolify:
53+
external: true

0 commit comments

Comments
 (0)