jokes-bapak2/docker-compose.yml

108 lines
2.5 KiB
YAML
Raw Normal View History

2021-07-15 19:21:22 +00:00
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
2021-07-23 15:39:23 +00:00
2021-07-15 19:21:22 +00:00
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
2021-07-23 15:39:23 +00:00
2021-07-15 19:21:22 +00:00
db:
build: ./database/postgres/
command: >
2022-09-03 13:37:44 +00:00
-c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
restart: unless-stopped
2021-07-23 15:39:23 +00:00
ports:
2021-07-15 19:21:22 +00:00
- 5432:5432
2021-07-23 15:39:23 +00:00
environment:
2021-07-15 19:21:22 +00:00
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
2022-09-03 13:37:44 +00:00
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
2021-07-15 19:21:22 +00:00
volumes:
- ./database/postgres/data:/data/postgres
cache:
image: redis:6.2.4-alpine
2022-09-03 13:37:44 +00:00
restart: unless-stopped
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
2021-07-15 19:21:22 +00:00
volumes:
- ./database/redis/etc:/usr/local/etc/redis
- ./database/redis/data:/data
2022-09-03 13:37:44 +00:00
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
2021-07-15 19:21:22 +00:00
cache-admin:
image: rediscommander/redis-commander:latest
restart: always
environment:
REDIS_PORT: 6379
REDIS_HOST: redis
ports:
- 2084:8081
depends_on:
- cache
2021-07-23 15:39:23 +00:00
db-admin:
2021-07-15 19:21:22 +00:00
image: sosedoff/pgweb:0.11.8
restart: always
ports:
- 2086:8081
links:
- postgres:postgres
environment:
DATABASE_URL: postgres://postgres:password@db/jokesbapak2
depends_on:
2022-09-03 13:37:44 +00:00
- db