Teledrive5.3 / docker /docker-compose.yml
Mythus's picture
Upload 224 files
7262ac3
version: '3'
services:
teledrive:
command: bash -c "(yarn api prisma migrate deploy || yarn api prisma migrate resolve --applied 20220420012853_init) && node api/dist/index.js"
labels:
traefik.http.routers.server.rule: Host(`teledrive.localhost`)
traefik.port: 4000
ports:
- "${PORT:-4000}:${PORT:-4000}"
expose:
- ${PORT:-4000}
build:
context: ../.
dockerfile: Dockerfile
args:
REACT_APP_TG_API_ID: ${TG_API_ID}
REACT_APP_TG_API_HASH: ${TG_API_HASH}
environment:
DATABASE_URL: postgres://postgres:${DB_PASSWORD}@db:5432/teledrive?connect_timeout=60&pool_timeout=60&socket_timeout=60
REDIS_URI: redis://redis:6379
env_file:
- .env
depends_on:
- db
- redis
db:
image: postgres:13
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: teledrive
volumes:
- teledrive_data:/var/lib/postgresql/data
redis:
image: redis:6
restart: always
volumes:
teledrive_data: