|
1 | 1 | services: |
2 | | -api: |
3 | | -build: |
4 | | -context: . |
5 | | -dockerfile: Dockerfile.production |
6 | | -container_name: prostaff-api |
7 | | -restart: unless-stopped |
8 | | -labels: |
9 | | -- "traefik.enable=true" |
10 | | -- "traefik.http.routers.prostaff-api.rule=Host(prostaff.gg)" |
11 | | -- "traefik.http.routers.prostaff-api.entrypoints=https" |
12 | | -- "traefik.http.routers.prostaff-api.tls=true" |
13 | | -- "traefik.http.routers.prostaff-api.tls.certresolver=letsencrypt" |
14 | | -- "traefik.http.services.prostaff-api.loadbalancer.server.port=3000" |
15 | | -environment: |
16 | | -RAILS_ENV: production |
17 | | -DATABASE_URL: DATABASEURLREPLICADATABASEURL:postgres://{POSTGRES_USER}:POSTGRESPASSWORD@postgres:5432/{POSTGRES_DB} |
18 | | -REDIS_URL: redis://redis:6379/1 |
19 | | -ELASTICSEARCH_URL: http://elasticsearch:9200 |
20 | | -RAILS_LOG_TO_STDOUT: "true" |
21 | | -PORT: 3000 |
22 | | -RAILS_MASTER_KEY: ${RAILS_MASTER_KEY} |
23 | | -RIOT_API_KEY: ${RIOT_API_KEY} |
24 | | -ports: |
25 | | -- "3000:3000" |
26 | | -depends_on: |
27 | | -redis: |
28 | | -condition: service_healthy |
29 | | -elasticsearch: |
30 | | -condition: service_healthy |
| 2 | + api: |
| 3 | + build: |
| 4 | + context: . |
| 5 | + dockerfile: Dockerfile.production |
| 6 | + container_name: prostaff-api |
| 7 | + restart: unless-stopped |
| 8 | + labels: |
| 9 | + - "traefik.enable=true" |
| 10 | + - "traefik.http.routers.prostaff-api.rule=Host(`prostaff.gg`)" |
| 11 | + - "traefik.http.routers.prostaff-api.entrypoints=https" |
| 12 | + - "traefik.http.routers.prostaff-api.tls=true" |
| 13 | + - "traefik.http.routers.prostaff-api.tls.certresolver=letsencrypt" |
| 14 | + - "traefik.http.services.prostaff-api.loadbalancer.server.port=3000" |
| 15 | + environment: |
| 16 | + RAILS_ENV: production |
| 17 | + DATABASE_URL: ${DATABASE_URL} |
| 18 | + REPLICA_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} |
| 19 | + REDIS_URL: redis://redis:6379/1 |
| 20 | + ELASTICSEARCH_URL: http://elasticsearch:9200 |
| 21 | + RAILS_LOG_TO_STDOUT: "true" |
| 22 | + PORT: 3000 |
| 23 | + RAILS_MASTER_KEY: ${RAILS_MASTER_KEY} |
| 24 | + RIOT_API_KEY: ${RIOT_API_KEY} |
| 25 | + ports: |
| 26 | + - "3000:3000" |
| 27 | + depends_on: |
| 28 | + redis: |
| 29 | + condition: service_healthy |
| 30 | + elasticsearch: |
| 31 | + condition: service_healthy |
31 | 32 |
|
32 | | -sidekiq: |
33 | | -build: |
34 | | -context: . |
35 | | -dockerfile: Dockerfile.production |
36 | | -container_name: prostaff-sidekiq |
37 | | -command: bundle exec sidekiq -C config/sidekiq.yml |
38 | | -environment: |
39 | | -RAILS_ENV: production |
40 | | -DATABASE_URL: DATABASEURLREPLICADATABASEURL:postgres://{POSTGRES_USER}:POSTGRESPASSWORD@postgres:5432/{POSTGRES_DB} |
41 | | -REDIS_URL: redis://redis:6379/1 |
42 | | -ELASTICSEARCH_URL: http://elasticsearch:9200 |
43 | | -RAILS_MASTER_KEY: ${RAILS_MASTER_KEY} |
44 | | -RIOT_API_KEY: ${RIOT_API_KEY} |
45 | | -depends_on: |
46 | | -- api |
47 | | -- redis |
| 33 | + sidekiq: |
| 34 | + build: |
| 35 | + context: . |
| 36 | + dockerfile: Dockerfile.production |
| 37 | + container_name: prostaff-sidekiq |
| 38 | + command: bundle exec sidekiq -C config/sidekiq.yml |
| 39 | + environment: |
| 40 | + RAILS_ENV: production |
| 41 | + DATABASE_URL: ${DATABASE_URL} |
| 42 | + REPLICA_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} |
| 43 | + REDIS_URL: redis://redis:6379/1 |
| 44 | + ELASTICSEARCH_URL: http://elasticsearch:9200 |
| 45 | + RAILS_MASTER_KEY: ${RAILS_MASTER_KEY} |
| 46 | + RIOT_API_KEY: ${RIOT_API_KEY} |
| 47 | + depends_on: |
| 48 | + - api |
| 49 | + - redis |
48 | 50 |
|
49 | | -postgres: |
50 | | -image: postgres:15-alpine |
51 | | -container_name: prostaff-postgres |
52 | | -restart: always |
53 | | -environment: |
54 | | -POSTGRES_DB: ${POSTGRES_DB:-prostaff_production} |
55 | | -POSTGRES_USER: ${POSTGRES_USER:-postgres} |
56 | | -POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe123!} |
57 | | -volumes: |
58 | | -- prostaff_pg_data:/var/lib/postgresql/data |
59 | | -healthcheck: |
60 | | -test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] |
61 | | -interval: 10s |
62 | | -timeout: 5s |
63 | | -retries: 5 |
| 51 | + postgres: |
| 52 | + image: postgres:15-alpine |
| 53 | + container_name: prostaff-postgres |
| 54 | + restart: always |
| 55 | + environment: |
| 56 | + POSTGRES_DB: ${POSTGRES_DB:-prostaff_production} |
| 57 | + POSTGRES_USER: ${POSTGRES_USER:-postgres} |
| 58 | + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe123!} |
| 59 | + volumes: |
| 60 | + - prostaff_pg_data:/var/lib/postgresql/data |
| 61 | + healthcheck: |
| 62 | + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] |
| 63 | + interval: 10s |
| 64 | + timeout: 5s |
| 65 | + retries: 5 |
64 | 66 |
|
65 | | -redis: |
66 | | -image: redis:7-alpine |
67 | | -container_name: prostaff-redis |
68 | | -restart: always |
69 | | -volumes: |
70 | | -- prostaff_redis_data:/data |
71 | | -healthcheck: |
72 | | -test: ["CMD", "redis-cli", "ping"] |
73 | | -interval: 10s |
74 | | -timeout: 5s |
75 | | -retries: 5 |
| 67 | + redis: |
| 68 | + image: redis:7-alpine |
| 69 | + container_name: prostaff-redis |
| 70 | + restart: always |
| 71 | + volumes: |
| 72 | + - prostaff_redis_data:/data |
| 73 | + healthcheck: |
| 74 | + test: ["CMD", "redis-cli", "ping"] |
| 75 | + interval: 10s |
| 76 | + timeout: 5s |
| 77 | + retries: 5 |
76 | 78 |
|
77 | | -elasticsearch: |
78 | | -image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4 |
79 | | -container_name: prostaff-elasticsearch |
80 | | -restart: unless-stopped |
81 | | -environment: |
82 | | -- discovery.type=single-node |
83 | | -- xpack.security.enabled=false |
84 | | -- ES_JAVA_OPTS=-Xms512m -Xmx512m |
85 | | -volumes: |
86 | | -- prostaff_es_data:/usr/share/elasticsearch/data |
87 | | -healthcheck: |
88 | | -test: ["CMD-SHELL", "curl -s http://localhost:9200 >/dev/null || exit 1"] |
89 | | -interval: 30s |
90 | | -timeout: 10s |
91 | | -retries: 5 |
| 79 | + elasticsearch: |
| 80 | + image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4 |
| 81 | + container_name: prostaff-elasticsearch |
| 82 | + restart: unless-stopped |
| 83 | + environment: |
| 84 | + - discovery.type=single-node |
| 85 | + - xpack.security.enabled=false |
| 86 | + - ES_JAVA_OPTS=-Xms512m -Xmx512m |
| 87 | + volumes: |
| 88 | + - prostaff_es_data:/usr/share/elasticsearch/data |
| 89 | + healthcheck: |
| 90 | + test: ["CMD-SHELL", "curl -s http://localhost:9200 >/dev/null || exit 1"] |
| 91 | + interval: 30s |
| 92 | + timeout: 10s |
| 93 | + retries: 5 |
92 | 94 |
|
93 | 95 | volumes: |
94 | | -prostaff_pg_data: |
95 | | -prostaff_redis_data: |
96 | | -prostaff_es_data: |
| 96 | + prostaff_pg_data: |
| 97 | + prostaff_redis_data: |
| 98 | + prostaff_es_data: |
| 99 | + |
0 commit comments