services:
  jonathan.is:
    image: jonathan.is
    pull_policy: never
    build:
      context: .
      dockerfile: Containerfile
    restart: unless-stopped
    ports:
      - "8081:80"
      - "8443:443"
      - "8443:443/udp"
    volumes:
      - caddy_data:/data
      - caddy_config:/config
  deploy:
    image: localhost/jonathan.is:deploy
    build:
      context: .
      dockerfile: Containerfile
      target: deploy
    pull_policy: never
    env_file:
      - production.env
    command: "neocities push --prune /pub"

volumes:
  caddy_data:
    external: true
  caddy_config:
