1. Caddy version (caddy version
):
latest
2. How I run Caddy:
a. System environment:
Docker
b. Command:
docker-compose up --build
c. Service/unit/compose file:
version: '3.7'
services:
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
- 4000:4000
- 8000:8000
- 8080:8080
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
postgres:
image: postgres:12
expose:
- 5432
restart: unless-stopped
volumes:
- skrrrt_data:/var/lib/postgresql/data
env_file:
- ./.env
hasura:
image: hasura/graphql-engine:v1.3.0
expose:
- 8080
restart: unless-stopped
depends_on:
- postgres
volumes:
- ./hasura/migrations:/hasura-migrations
- ./hasura/metadata:/hasura-metadata
env_file:
- ./.env
app:
build: ./
expose:
- 8000
depends_on:
- postgres
- hasura
restart: unless-stopped
env_file:
- ./.env
volumes:
skrrrt_data:
caddy_data:
caddy_config:
d. My complete Caddyfile or JSON config:
skrrrt.io:80, skrrrt.io:443 {
reverse_proxy * app:8000
}
skrrrt.io:8080 {
reverse_proxy * hasura:8080
}
skrrrt.io:4000 {
respond "reverse proxy working"
}
3. The problem I’m having:
When I access my website http://skrrrt.io I would expect to be redirected to HTTPS. HTTPS works, it’s just not redirecting to this.