Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#236] Fix deployments always affecting both environments #247

Merged
merged 1 commit into from
Jul 13, 2023
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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,17 @@ docker compose up -d
docker load -i /tmp/cpmonitor.tar
docker load -i /tmp/klimaschutzmonitor-dbeaver.tar
```
(Docker should print "Loading layer" for both images.)
8. Tag the images with the current date in case we want to roll back:
(Docker should print "Loading layer" for both images.)
8. Tag the images with the current date in case we want to roll back, as well as with the environment you're deploying to (to prevent affecting the other environment):
```sh
DATESTR=$(date +%Y-%b-%d) && echo ${DATESTR}
docker tag cpmonitor:latest cpmonitor:${DATESTR}
docker tag cpmonitor:latest cpmonitor:<testing|production>
docker tag klimaschutzmonitor-dbeaver:latest klimaschutzmonitor-dbeaver:${DATESTR}
docker tag klimaschutzmonitor-dbeaver:latest klimaschutzmonitor-dbeaver:<testing|production>
```
9. Stop the server, apply the migrations, start the server:
```sh
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
build:
context: ./
dockerfile: ./docker/cpmonitor/Dockerfile
image: cpmonitor
image: cpmonitor:${ENVIRONMENT_NAME}
user: "1007"
volumes:
- ${DB_PATH?:Please set the DB_PATH environment variable.}:/db
Expand Down Expand Up @@ -40,7 +40,7 @@ services:
dbeaver:
build: ./docker/dbeaver
container_name: dbeaver-${ENVIRONMENT_NAME}
image: klimaschutzmonitor-dbeaver
image: klimaschutzmonitor-dbeaver:${ENVIRONMENT_NAME}
volumes:
- ${DB_PATH?:Please set the DB_PATH environment variable.}:/db
networks:
Expand Down