docker-compose.dev.yml
Rama main · réplica de lectura del repositorio original.
services:
server:
init: true
build:
context: ./server
dockerfile: Dockerfile.dev
ports:
- "4000:4000"
expose:
- 4000
depends_on:
db:
condition: service_healthy
mq:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- localhost:4000"]
interval: 5s
timeout: 5s
retries: 20
volumes:
- ./server/src:/app/src
- ./server/prisma:/app/prisma
- ./server/test:/app/test
- ./server/package.json:/app/package.json
- ./server/.yarn:/app/.yarn
- server_deps:/app/node_modules
- ./server/.yarnrc.yml:/app/.yarnrc.yml
- ./server/tsconfig.json:/app/tsconfig.json
- ./server/tsconfig.build.json:/app/tsconfig.build.json
- ./server/yarn.lock:/app/yarn.lock
- ${DATA_DIR}:${INTERNAL_DATA_DIR}
- ${CONFIG_DIR}:${INTERNAL_CONFIG_DIR}
env_file:
- .env
environment:
- TRANSCODER_URL=http://transcoder:7666
- MEILI_HOST=http://meilisearch:7700
- RABBITMQ_URL=amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@mq:5672
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?schema=public
scanner:
build:
context: ./scanner
dockerfile: Dockerfile.dev
restart: on-failure
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- localhost:8133"]
interval: 5s
timeout: 5s
retries: 20
ports:
- "8133:8133"
environment:
- API_URL=http://server:4000
- INTERNAL_CONFIG_DIR=${INTERNAL_CONFIG_DIR}
- INTERNAL_DATA_DIR=${INTERNAL_DATA_DIR}
- API_KEYS=${API_KEYS}
volumes:
- ./scanner:/app
- ${DATA_DIR}:${INTERNAL_DATA_DIR}
- ${CONFIG_DIR}:${INTERNAL_CONFIG_DIR}:ro
front:
build:
context: ./front
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
depends_on:
server:
condition: service_healthy
scanner:
condition: service_healthy
volumes:
- ./front/apps/web/:/app/apps/web/
- ./front/packages:/app/packages
- ./front/translations:/app/translations
- ./front/assets:/app/assets
- ./front/package.json:/app/package.json
- ./front/tsconfig.base.json:/app/tsconfig.base.json
- front_deps:/app/node_modules
environment:
# This can be commented out. see front/next.config.js
- PUBLIC_SERVER_URL=http://localhost:4000
- SSR_SERVER_URL=http://server:4000
- PUBLIC_SCANNER_URL=http://localhost:8133
- SSR_SCANNER_URL=http://scanner:8133
- PUBLIC_MATCHER_URL=http://localhost:6789
- SSR_MATCHER_URL=http://matcher:6789
matcher:
build:
context: ./matcher
args:
- VERSION=dev
restart: on-failure
command: fastapi dev matcher --port 6789 --host 0.0.0.0
ports:
- "6789:6789"
depends_on:
server:
condition: service_healthy
mq:
condition: service_healthy
environment:
- API_URL=http://server:4000
- INTERNAL_CONFIG_DIR=${INTERNAL_CONFIG_DIR}
- API_KEYS=${API_KEYS}
- RABBITMQ_URL=amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@mq:5672
volumes:
- ./matcher:/app
- ${CONFIG_DIR}:${INTERNAL_CONFIG_DIR}:ro
meilisearch:
image: getmeili/meilisearch:v1.5
restart: on-failure
expose:
- 7700
volumes:
- search:/meili_data
environment:
- MEILI_ENV=development
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_LOG_LEVEL=WARN
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--spider",
"http://0.0.0.0:7700/health",
]
timeout: 5s
retries: 10
transcoder:
image: ghcr.io/zoriya/kyoo_transcoder:5.2.1
ports:
- "7666:7666"
restart: on-failure
cpus: 1
environment:
- GOCODER_SAFE_PATH=${INTERNAL_DATA_DIR}
- PGUSER=${POSTGRES_USER}
- PGPASSWORD=${POSTGRES_PASSWORD}
- PGDATABASE=${POSTGRES_DB}
- PGHOST=db
- PGPORT=5432
volumes:
- ${DATA_DIR}:${INTERNAL_DATA_DIR}:ro
- transcoder_cache:/cache
depends_on:
db:
condition: service_healthy
db:
image: postgres:alpine3.14
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
env_file:
- .env
mq:
hostname: meelo-mq
image: rabbitmq:4.3-alpine
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 5s
retries: 10
volumes:
- rabbitmq_data:/var/lib/rabbitmq
volumes:
search:
transcoder_cache:
front_deps:
server_deps:
rabbitmq_data: