|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
taskme-api:
|
|
|
|
build:
|
|
|
|
context: ./
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
expose:
|
|
|
|
- 3000
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
depends_on:
|
|
|
|
- taskme-postgres
|
|
|
|
- taskme-redis
|
|
|
|
- taskme-minio
|
|
|
|
links:
|
|
|
|
- taskme-postgres
|
|
|
|
- taskme-redis
|
|
|
|
- taskme-minio
|
|
|
|
volumes:
|
|
|
|
- ./:/home/node/app
|
|
|
|
command: npm run start
|
|
|
|
|
|
|
|
taskme-postgres:
|
|
|
|
image: postgres:11
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 3303:5432
|
|
|
|
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: ${DATABASE_PASS}
|
|
|
|
POSTGRES_USER: ${DATABASE_USER}
|
|
|
|
POSTGRES_DB: ${DATABASE_DB}
|
|
|
|
|
|
|
|
taskme-redis:
|
|
|
|
image: 'redis:4-alpine'
|
|
|
|
command: redis-server --requirepass ${REDIS_PASS}
|
|
|
|
ports:
|
|
|
|
- '6379:6379'
|
|
|
|
|
|
|
|
taskme-minio:
|
|
|
|
hostname: taskme-minio
|
|
|
|
image: minio/minio:RELEASE.2021-09-18T18-09-59Z
|
|
|
|
container_name: taskme-minio
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- './taskme/data/:/data'
|
|
|
|
- './taskme/config:/root/.minio'
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 5003:9000
|
|
|
|
- 5004:9001
|
|
|
|
environment:
|
|
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
|
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
|
|
|
command: server --console-address ":9001" /data
|
|
|
|
|
|
|
|
taskme-createbuckets:
|
|
|
|
image: minio/mc
|
|
|
|
depends_on:
|
|
|
|
- taskme-minio
|
|
|
|
entrypoint: >
|
|
|
|
/bin/sh -c "
|
|
|
|
sleep 10;
|
|
|
|
/usr/bin/mc config host add data http://${MINIO_HOST}:${MINIO_PORT} ${MINIO_ACCESS_KEY} ${MINIO_SECRET_KEY};
|
|
|
|
/usr/bin/mc mb data/${MINIO_BUCKET};
|
|
|
|
/usr/bin/mc policy set public data/${MINIO_BUCKET};
|
|
|
|
exit 0;
|
|
|
|
"
|
|
|
|
taskme-imgproxy:
|
|
|
|
image: 'darthsim/imgproxy:latest'
|
|
|
|
ports:
|
|
|
|
- '5005:8080'
|
|
|
|
environment:
|
|
|
|
IMGPROXY_KEY: ${IMGPROXY_KEY}
|
|
|
|
IMGPROXY_SALT: ${IMGPROXY_SALT}
|
|
|
|
IMGPROXY_MAX_SRC_FILE_SIZE: 10485760
|
|
|
|
|
|
|
|
taskme-postgres-old:
|
|
|
|
image: postgres:11
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
ports:
|
|
|
|
- 3307:5432
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: ${OLD_DATABASE_PASS}
|
|
|
|
POSTGRES_USER: ${OLD_DATABASE_USER}
|
|
|
|
POSTGRES_DB: ${OLD_DATABASE_DB}
|