Skip to content

Commit

Permalink
docs: add traefik config
Browse files Browse the repository at this point in the history
  • Loading branch information
openscript committed Sep 29, 2024
1 parent b57ee9a commit 03b1f1e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: traefik:2.7
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/traefik.yml
- ./traefik.yaml:/traefik.yml
- letsencrypt:/letsencrypt
ports:
- "80:80"
Expand Down Expand Up @@ -57,7 +57,7 @@ services:
quassel-frontend:
image: ghcr.io/openscript-ch/quassel-frontend:latest
environment:
API: api.example.com
API: api.test.example.com
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.frontend-redirect-https.redirectscheme.scheme=https"
Expand Down
16 changes: 6 additions & 10 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,23 @@ The following sources were used:

### Application system

1. Install git

```bash
apt install git
```

1. Clone this repository

```bash
cd /srv && wget https://raw.githubusercontent.com/openscript-ch/quassel/refs/heads/main/docs/docker-compose.yaml
cd /srv \
&& wget https://raw.githubusercontent.com/openscript-ch/quassel/refs/heads/main/docs/docker-compose.yaml \
&& wget https://raw.githubusercontent.com/openscript-ch/quassel/refs/heads/main/docs/traefik.yaml
```

1. Make sure that the DNS is routing all subdomains to the host where the individual services run on.
1. Replace all `example.com` with the domain where the application runs on.

```bash
sed -i "s/example.com/example.ch/g" docker-compose.yml
sed -i "s/example.com/example.ch/g" docker-compose.yaml
```

1. Change contact email for SSL certificates in `traefik.yml`
1. Configure the following environment variables in `docker-compose.yml`:
1. Change contact email for SSL certificates in `traefik.yaml`
1. Configure the following environment variables in `docker-compose.yaml`:
- **todo**
1. Run application system

Expand Down
25 changes: 25 additions & 0 deletions docs/traefik.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
log:
level: INFO

api:
insecure: false
dashboard: true

entryPoints:
http:
address: ":80"
https:
address: ":443"

providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false

certificatesResolvers:
defaultResolver:
acme:
email: "[email protected]"
storage: "/letsencrypt/acme.json"
httpChallenge:
entryPoint: "http"

0 comments on commit 03b1f1e

Please sign in to comment.