2021-07-15 19:21:22 +00:00
|
|
|
services:
|
|
|
|
api:
|
|
|
|
build: ./api/
|
2022-10-16 04:25:36 +00:00
|
|
|
environment:
|
|
|
|
ENV: production
|
|
|
|
PORT: 5000
|
|
|
|
HOSTNAME: "0.0.0.0"
|
|
|
|
REDIS_URL: redis://@cache:6379
|
|
|
|
MINIO_HOST: bucket:9000
|
|
|
|
MINIO_ACCESS_ID: minio
|
|
|
|
MINIO_SECRET_KEY: password
|
|
|
|
MINIO_TOKEN: ""
|
|
|
|
SENTRY_DSN: ""
|
2021-07-15 19:21:22 +00:00
|
|
|
ports:
|
|
|
|
- 5000:5000
|
2022-09-10 13:05:46 +00:00
|
|
|
healthcheck:
|
|
|
|
test: "curl -f http://api:5000/health/"
|
|
|
|
interval: 15s
|
|
|
|
timeout: 12s
|
|
|
|
retries: 10
|
|
|
|
start_period: 30s
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
|
|
|
delay: 30s
|
|
|
|
max_attempts: 20
|
|
|
|
window: 60s
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 1GB
|
|
|
|
cpus: '1'
|
|
|
|
reservations:
|
|
|
|
memory: 50MB
|
|
|
|
cpus: '0.1'
|
2021-07-15 19:21:22 +00:00
|
|
|
depends_on:
|
2022-09-10 13:05:46 +00:00
|
|
|
bucket:
|
|
|
|
condition: service_healthy
|
|
|
|
cache:
|
|
|
|
condition: service_healthy
|
2021-07-23 15:39:23 +00:00
|
|
|
|
2021-07-15 19:21:22 +00:00
|
|
|
client:
|
|
|
|
build: ./client/
|
2022-10-16 04:25:36 +00:00
|
|
|
environment:
|
|
|
|
PORT: 3000
|
|
|
|
VITE_NODE_ENV: production
|
|
|
|
VITE_SERVER_API_ENDPOINT: http://api:5000
|
|
|
|
VITE_BROWSER_API_ENDPOINT: http://localhost:3000
|
|
|
|
VITE_SENTRY_DSN: ""
|
2021-07-15 19:21:22 +00:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2022-09-03 13:37:44 +00:00
|
|
|
healthcheck:
|
2022-09-10 13:05:46 +00:00
|
|
|
test: "curl -f http://client:3000/"
|
|
|
|
interval: 15s
|
|
|
|
timeout: 12s
|
|
|
|
retries: 10
|
2022-09-03 13:37:44 +00:00
|
|
|
start_period: 30s
|
2022-09-10 13:05:46 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
|
|
|
delay: 30s
|
|
|
|
max_attempts: 20
|
|
|
|
window: 60s
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 500MB
|
|
|
|
cpus: '1'
|
|
|
|
reservations:
|
|
|
|
memory: 50MB
|
|
|
|
cpus: '0.1'
|
|
|
|
depends_on:
|
|
|
|
api:
|
|
|
|
condition: service_healthy
|
2021-07-15 19:21:22 +00:00
|
|
|
|
|
|
|
cache:
|
2023-08-12 05:26:05 +00:00
|
|
|
image: redis:7.0.12-alpine3.18
|
2021-07-15 19:21:22 +00:00
|
|
|
ports:
|
|
|
|
- 6379:6379
|
2022-09-03 13:37:44 +00:00
|
|
|
healthcheck:
|
|
|
|
test: redis-cli -a foobared ping | grep PONG
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
start_period: 30s
|
2022-09-10 13:05:46 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
|
|
|
delay: 30s
|
|
|
|
max_attempts: 20
|
|
|
|
window: 60s
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 2GB
|
|
|
|
cpus: '1'
|
|
|
|
reservations:
|
|
|
|
memory: 100MB
|
|
|
|
cpus: '0.1'
|
2021-07-15 19:21:22 +00:00
|
|
|
volumes:
|
2022-09-10 13:05:46 +00:00
|
|
|
- ./data/redis/etc:/usr/local/etc/redis
|
|
|
|
- ./data/redis/data:/data
|
2021-07-15 19:21:22 +00:00
|
|
|
|
2022-09-03 13:37:44 +00:00
|
|
|
bucket:
|
2022-09-10 13:05:46 +00:00
|
|
|
image: quay.io/minio/minio:RELEASE.2022-09-07T22-25-02Z
|
2022-09-03 13:37:44 +00:00
|
|
|
command: server /data --console-address ":9001"
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- 9001:9001
|
|
|
|
- 9000:9000
|
|
|
|
environment:
|
|
|
|
MINIO_ROOT_USER: minio
|
|
|
|
MINIO_ROOT_PASSWORD: password
|
|
|
|
MINIO_ACCESS_KEY: minio_access_key
|
|
|
|
MINIO_SECRET_KEY: minio_secret_key
|
|
|
|
healthcheck:
|
|
|
|
test: "curl -f http://localhost:9000/minio/health/live"
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
|
|
|
start_period: 60s
|
2022-09-10 13:05:46 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
|
|
|
delay: 30s
|
|
|
|
max_attempts: 20
|
|
|
|
window: 60s
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 4GB
|
|
|
|
cpus: '2'
|
|
|
|
reservations:
|
|
|
|
memory: 50MB
|
|
|
|
cpus: '0.1'
|
2022-09-03 13:37:44 +00:00
|
|
|
volumes:
|
|
|
|
- ./data/minio:/data
|