Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,23 @@ Clone the liip/pontsun repository anywhere. Then `cd` to the working copy.

Create an envfile

```bash
```sh
cp ./containers/.env.example ./containers/.env
```

Adapt the `./containers/.env` file as needed.

Create certificates for HTTPS

```bash
chmod u+x ./scripts/generate-certificates.sh
./scripts/generate-certificates.sh
```sh
USER_ID=$(id -u) docker-compose -f docker-compose.certificates.yml up
```

You can add the fake root CA authority certificate `certificates/docker.rootCA.crt` to your browser authorities in order to let it trust the concerned local developement instances.
You can add the fake root CA authority certificate `certificates/docker.test.rootCA.crt` to your browser authorities in order to let it trust the concerned local developement instances.

## Start Traefik and Portainer

```bash
```sh
cd containers
docker-compose up -d
```
Expand Down
2 changes: 2 additions & 0 deletions containers/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ PONTSUN_NETWORK=pontsun
PORTAINER_TAG=1.22.1
# https://hub.docker.com/_/traefik
TRAEFIK_TAG=1.7.18-alpine
# https://hub.docker.com/r/liip/ssl-keygen
SSL_KEYGEN_TAG=1.0.0
17 changes: 17 additions & 0 deletions containers/docker-compose.certificates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.5'
services:

ssl-keygen:
image: liip/ssl-keygen:$SSL_KEYGEN_TAG
container_name: 'pontsun_ssl-keygen'
command: ls
environment:
OPENSSL_CERTIFICATE_SUBJECT_COUNTRY: CH
OPENSSL_CERTIFICATE_SUBJECT_STATE: FR
OPENSSL_CERTIFICATE_SUBJECT_LOCATION: Fribourg
OPENSSL_CERTIFICATE_SUBJECT_ORGANIZATION: Liip
OPENSSL_CERTIFICATE_SUBJECT_ORGANIZATION_UNIT: Pontsun
SITE_DOMAIN: $PROJECT_DOMAIN
volumes:
- ../certificates/:/certificates:rw
user: $USER_ID
4 changes: 2 additions & 2 deletions containers/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ services:
--docker.exposedByDefault=false \
--defaultEntryPoints='https' \
--defaultEntryPoints='http' \
--rootCAs='/certs/${PROJECT_NAME}.rootCA.crt' \
--rootCAs='/certs/${PROJECT_DOMAIN}.rootCA.crt' \
--entryPoints='Name:http Address::80' \
--entryPoints='Name:https Address::443 TLS:/certs/${PROJECT_NAME}.crt,/certs/${PROJECT_NAME}.key' \
--entryPoints='Name:https Address::443 TLS:/certs/${PROJECT_DOMAIN}.crt,/certs/${PROJECT_DOMAIN}.key' \
--logLevel=ERROR
restart: always
ports:
Expand Down
36 changes: 0 additions & 36 deletions scripts/generate-certificates.sh

This file was deleted.