-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for certificate renewal
- Loading branch information
Showing
1 changed file
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,32 @@ The application is now deployed and the website should be accessible via http (` | |
release and the containers restarted accordingly via [Watchtower](https://github.com/containrrr/watchtower). | ||
|
||
Note that this also means that it is currently not possible to have multiple Frontend instances deployed that talk to different backend instances. | ||
To achieve that, the Frontend instances each need to be manually built and deployed with the correct environment variables. | ||
To achieve that, the Frontend instances each need to be manually built and deployed with the correct environment variables. | ||
|
||
## Renewing Certificates | ||
|
||
1. ssh into the server, e.g. `ssh [email protected] -i .ssh/bp_server` | ||
2. free up port 80 by stopping website: `sudo docker-compose -f docker-compose.yml down` | ||
3. run certbot: ` sudo certbot certonly --nginx -d klinik-dps.de -d www.klinik-dps.de` | ||
4. kill nginx: `sudo pkill nginx` (yeah it's in a weird state at this point and needs to be killed that way, don't ask me why) | ||
5. restart website: `sudo docker-compose -f docker-compose.yml up` | ||
|
||
If you run into problems: | ||
|
||
1. Check if port 80 is in use by something else: `netstat -antp` | ||
2. Allow http in firewall if necessary: `firewall-cmd --permanent --add-service=http` and `firewall-cmd --reload` | ||
3. Make sure nginx config is fine (should be located in `/etc/nginx/conf.d`): | ||
|
||
``` | ||
server { | ||
listen 80; | ||
server_name klinik-dps.de www.klinik-dps.de; | ||
root /usr/share/nginx/html; # Base directory for web content | ||
index index.html; | ||
location /.well-known/ { | ||
try_files $uri $uri/ =404; | ||
} | ||
} | ||
``` |