Skip to content

Commit

Permalink
#252: documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolkenfarmer committed Jun 17, 2024
1 parent cb2f062 commit 1a178f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ There are two environment files provided with the docker-compose file in the art
The `.env.prod` file is used for the production version on a server and the `.env.dev` file is used for the development version locally.
Replace `<prod/dev>` with `prod` or `dev` in the following commands to use the respective environment file.
0. Prerequisites: Install Docker and Docker Compose on the server where you want to deploy the software.
1. Download the action artifacts and extract them in a folder
1. Download the action artifacts and extract them in a folder. Alternatively, you can manually copy the needed files from the repo (.
/docker-compose.yml, ./.env.<prod/dev>).
2. Recommended: As the env files are probably stored in a public repository, it is strongly encouraged to change the SECRET_KEY and the
POSTGRES_PASSWORD variables in the used `.env.<prod/dev>` file.
3. Log into the GitHub Packages registry with the following command. Ask a team member for valid credentials.
```bash
docker login ghcr.io -u <username> -p <token>
```
4. Optional: If you want a clean start, run following command in that folder in order to recreate the database:
4. Optional: If you want a clean start and have the application already running, execute following command in that folder in order to recreate the
database:
```bash
docker-compose --env-file .env.<prod/dev> down --volumes
```
Expand All @@ -37,7 +39,8 @@ docker-compose --env-file .env.<prod/dev> pull
docker-compose --env-file .env.<prod/dev> up
```

The application is now deployed and the website should be accessible on port 5173.
The application is now deployed and the website should be accessible on port 5173. The images will be automatically updated on each release and
the containers restarted accordingly.

Keep in mind that the IP address of the server running the back- and frontend are hardcoded in the environment files. For
the backend a simple correction of the `FRONTEND_URL` variable within the `.env.<prod/dev>` file on the server is enough, but fot the frontend the
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: '3.8'

services:
# Update service for self-hosted Docker images for completely automatic deployment
# Only updates images marked with the label "com.centurylinklabs.watchtower.enable=true"
watchtower:
image: containrrr/watchtower
volumes:
Expand Down

0 comments on commit 1a178f3

Please sign in to comment.