Skip to content

Commit

Permalink
bugfix on .env files and more certbot instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ttschnz committed Jan 20, 2022
1 parent 1fbd1a1 commit 8fac2cd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
12 changes: 8 additions & 4 deletions envVariables.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ MYSQL_PORT=3306
HTTP_PORT=80
HTTPS_PORT=443
WEBSOCKET_PORT=8080
# inside the container -> head over th docker-compose to edit mountpoints
PUBLIC_HTML=/www/
WELL_KNOWN_BASE=/wellKnown/
MAX_POST_SIZE=2000000000 # 2 GB
FILE_DIR=/encryptedFiles
# 2 GB
MAX_POST_SIZE=2000000000
USE_LICENCES=true
AUTH_KEY_LENGTH=128
AUTH_KEY_DURATION=3600 # 1 hour
API_STANDALONE=true # is this api the only server connected to the db?
# 1 hour
AUTH_KEY_DURATION=3600
# is this api the only server connected to the db?
API_STANDALONE=true
FILE_NAME_LENGTH=32
MESSAGE_DEFAULT_LIMIT=200
FILE_DIR=/encryptedFiles
FILE_EXTENSION=.aes
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ if you do not allready have a certificate for your domain, you can get one for f
Config the server to ENABLE_SSL=false, since you do not have a certificate at the moment. After that, run `docker-compose up -d` to start the server. have a look at the logs with `docker-compose logs web` to ensure that the server is running, or curl it on its port defined i `envVariables.env` (default is 80).
If your server is running, follow the instructions on https://certbot.eff.org/instructions and choose `webroot`.

The well-known folder for the acme-challenge is located inside the cloned repo: `.wellKnown`.
The well-known folder for the acme-challenge is located inside the cloned repo: you can indicate `~/docker_server/.wellKnown` as webroot.
If you wish, you can activate the automatic renewal, but note that the server needs to be restarted if a new certificate is issued since the certificate is read at server startup.

If the certificate has been issued, rebuid the server (`docker-compose up -d --build`) with ssl enabled (`ssl.env`=> `ENABLE_SSL=true`)
## starting your servers
`docker-compose up -d --build`
## terminating the servers
Expand Down
3 changes: 2 additions & 1 deletion ssl.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# don't forget to make the folders readable to non-sudo: https://certbot.eff.org/docs/using.html#where-are-my-certificates => chmod 0755 /etc/letsencrypt/{live,archive}
CERT_ROOT=/letsencrypt/live/[DOMAINNAME]/[PEMFILE] # [DOMAINNAME] and [PEMFILE] are placeholders and will be replaced automatically
# [DOMAINNAME] and [PEMFILE] are placeholders and will be replaced automatically
CERT_ROOT=/letsencrypt/live/[DOMAINNAME]/[PEMFILE]
DOMAINNAME=example.com
SSL_KEY=privkey.pem
SSL_CERT=fullchain.pem
Expand Down

0 comments on commit 8fac2cd

Please sign in to comment.