version: "3.3"

services:
  udohaiku_backend:
    build:
      context: ./srv
      dockerfile: Dockerfile
    restart: unless-stopped
    # ports:
    #   - "3030:3000"
    networks:
      - traefik
    stdin_open: true
    tty: true

  udohaiku_frontend:
    image: app
    build:
      context: ./view
      dockerfile: Dockerfile
    restart: unless-stopped
    # ports:
    #   - "8485:80"
    networks:
      - traefik
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.udohaiku.entrypoints=websecure"
      - "traefik.http.routers.udohaiku.rule=Host(`$DOMAIN_NAME`)"
      - "traefik.http.routers.udohaiku.tls.certresolver=letsencr"
      - "traefik.http.services.udohaiku.loadbalancer.server.port=80"

networks:
  traefik:
    external: true
