invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
419 stars 268 forks source link

Where to get started with Caddy? #408

Closed kreativmonkey closed 3 years ago

kreativmonkey commented 3 years ago

The documentation and every part of this Repository tell me set the default webserver would be caddy but only this line of the config looks like caddy:

https://github.com/invoiceninja/dockerfiles/blob/c17e37c4b8856066c68de562a8791c99df05f84f/docker-compose.yml#L10

if i change the webserver to caddy and uncomment this line, the caddy is running but not loading the Caddyfile becouse it is the wrong mounting place.

where to find the "default" caddy config template?

kreativmonkey commented 3 years ago

For the reason other people searching for this issue, that is the solution:

server:
    image: caddy
    restart: always
    env_file: env
    volumes:
      # Vhost configuration
      - ./config/caddy/Caddyfile:/etc/caddy/Caddyfile
      #- ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
      - ./docker/app/public:/var/www/app/public:ro
    depends_on:
      - app
    # Run webserver nginx on port 80
    # Feel free to modify depending what port is already occupied
    ports:
      - "80:80"
      - "443:443"
    networks:
      - invoiceninja
    extra_hosts:
      - "in5.localhost:192.168.0.124 " #host and ip