108 lines
2.5 KiB
YAML
108 lines
2.5 KiB
YAML
services:
|
|
api:
|
|
build: ./api/
|
|
restart: always
|
|
env_file: ./api/.env
|
|
ports:
|
|
- 5000:5000
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
# Uncomment these if you want to have it on
|
|
# volumes:
|
|
# ./api:/app
|
|
|
|
client:
|
|
build: ./client/
|
|
restart: always
|
|
env_file: ./client/.env
|
|
ports:
|
|
- 3000:3000
|
|
depends_on:
|
|
- api
|
|
# Uncomment these if you want to have it on
|
|
# volumes:
|
|
# ./client:/app
|
|
|
|
db:
|
|
build: ./database/postgres/
|
|
command: >
|
|
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
|
|
restart: unless-stopped
|
|
ports:
|
|
- 5432:5432
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: jokesbapak2
|
|
PGDATA: /data/postgres
|
|
# I got this key from somewhere. It works when you run it locally.
|
|
POSTGRES_SSL_CA_CERT: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURjekNDQWx1Z0F3SUJBZ0lVR3lDaElvR3g0
|
|
healthcheck:
|
|
test: pg_isready -U postgres
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
volumes:
|
|
- ./database/postgres/data:/data/postgres
|
|
|
|
cache:
|
|
image: redis:6.2.4-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- 6379:6379
|
|
healthcheck:
|
|
test: redis-cli -a foobared ping | grep PONG
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
volumes:
|
|
- ./database/redis/etc:/usr/local/etc/redis
|
|
- ./database/redis/data:/data
|
|
|
|
bucket:
|
|
image: quay.io/minio/minio:RELEASE.2022-02-05T04-40-59Z
|
|
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
|
|
volumes:
|
|
- ./data/minio:/data
|
|
|
|
cache-admin:
|
|
image: rediscommander/redis-commander:latest
|
|
restart: always
|
|
environment:
|
|
REDIS_PORT: 6379
|
|
REDIS_HOST: redis
|
|
ports:
|
|
- 2084:8081
|
|
depends_on:
|
|
- cache
|
|
|
|
db-admin:
|
|
image: sosedoff/pgweb:0.11.8
|
|
restart: always
|
|
ports:
|
|
- 2086:8081
|
|
links:
|
|
- postgres:postgres
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:password@db/jokesbapak2
|
|
depends_on:
|
|
- db
|