services:
  chatroom-app:
    build:
      context: .
    image: chatroom-app:demo
    restart: unless-stopped
    expose:
      - "8000"
    networks:
      - chatroom_internal

  chatroom-nginx:
    image: nginx:alpine
    restart: unless-stopped
    depends_on:
      - chatroom-app
    expose:
      - "80"
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    networks:
      - chatroom_internal
      - caddy_proxy

networks:
  chatroom_internal:
    driver: bridge
  caddy_proxy:
    external: true
    name: caddy_proxy
