# CREDIT: https://github.com/shren207/nextjs-docker-compose
# CREATED: 04-07-2023
services:
  teddy_y_share:
    container_name: teddy_y_share
    build: .
    restart: always
    volumes:
      - $PWD/app:/app
      - teddy_y_node_modules:/app/node_modules
    working_dir: /app
    # command: sleep infinity
    command: bash entry.sh

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.teddy_y-http.rule=Host(`teddy_y.louislabs.com`)"
      - "traefik.http.routers.teddy_y-http.entrypoints=web"
      - "traefik.http.routers.teddy_y-http.middlewares=teddy_y-https"
      - "traefik.http.middlewares.teddy_y-https.redirectscheme.scheme=https"
      - "traefik.http.routers.teddy_y.rule=Host(`teddy_y.louislabs.com`)"
      - "traefik.http.routers.teddy_y.entrypoints=websecure"
      - "traefik.http.routers.teddy_y.tls.certresolver=myresolver"
      - "traefik.http.services.teddy_y.loadbalancer.server.port=8080"

networks:
  default:
    external:
      name: traefik-proxy-network

volumes:
  teddy_y_node_modules:
