-
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.
Merge branch 'main' into 330-add-experimental-gradual-patient-progres…
…sion-option
- Loading branch information
Showing
5 changed files
with
45 additions
and
13 deletions.
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
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
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
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
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 |
---|---|---|
|
@@ -25,11 +25,39 @@ docker login ghcr.io -u <username> -p <token> | |
``` | ||
8. Run following commands to run the containers: | ||
```bash | ||
docker compose -f docker-compose.<dev/prod>.yml up --build | ||
docker compose -f docker-compose.<dev/prod>.yml up | ||
``` | ||
|
||
The application is now deployed and the website should be accessible via http (`dev`) or https (`prod`). The images will be automatically updated on each | ||
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; | ||
} | ||
} | ||
``` |