em-shop/users/docker-compose.yml
2024-11-20 09:53:03 +05:00

28 lines
703 B
YAML
Executable File

services:
users:
container_name: users
build:
context: .
target: 'production-stage'
env_file:
- ./config.env
environment:
NODE_ENV: production
command: ["node", "dist/main.js"]
restart: unless-stopped
networks:
- proxynet
labels:
- "traefik.enable=true"
- "traefik.http.routers.users.rule=PathPrefix(`/users/api`)"
- "traefik.http.routers.users.entrypoints=http"
- "traefik.http.routers.users.service=users-service"
- "traefik.http.services.users-service.loadbalancer.server.port=3003"
logging:
driver: "json-file"
options:
max-size: "1m"
networks:
proxynet:
external: true