Skip to content

Commit

Permalink
Update 4.1.7 (20240418)
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Schieder authored and Magnus Schieder committed Apr 18, 2024
2 parents b8f3b25 + 496f7cb commit 6b06e27
Show file tree
Hide file tree
Showing 23 changed files with 301 additions and 151 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
run: |
./setup.sh
sed -i '/x-default-environment/a \ \ DATASTORE_INITIAL_DATA_FILE: cli/example-data.json' docker-compose.yml
docker-compose build --parallel
docker-compose up -d
docker compose build --parallel
docker compose up -d
- name: Wait for dev setup
uses: iFaxity/wait-on-action@v1.1.0
Expand All @@ -31,7 +31,7 @@ jobs:

- name: Setup initial data
working-directory: "./dev/localprod"
run: docker-compose exec -T datastoreWriter python cli/create_initial_data.py
run: docker compose exec -T datastoreWriter python cli/create_initial_data.py

- name: Start tests
working-directory: "./openslides-client"
Expand All @@ -47,4 +47,4 @@ jobs:
- name: Shut down setup
if: always()
working-directory: "./dev/localprod"
run: docker-compose down --volumes --remove-orphans
run: docker compose down --volumes --remove-orphans
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Requirements

You need git, bash, docker, docker-compose, make and openssl installed.
You need `git`, `bash`, `docker`, `docker compose` (v2), `make` and `openssl` installed.

Go is needed to install https://github.com/FiloSottile/mkcert (but Go is not a requirement to start the development server). The development setup uses HTTPS per default. OpenSlides does not work with HTTP anymore since features are required (like http2) that only work in a secure environment.
`go` is needed to install https://github.com/FiloSottile/mkcert (but it is not a requirement to start the development server). The development setup uses HTTPS per default. OpenSlides does not work with HTTP anymore since features are required (like http2) that only work in a secure environment.

## Before starting the development

Expand Down
24 changes: 12 additions & 12 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ but for most cases this is not recommended.

Then run:

$ docker-compose pull
$ docker-compose up --detach
$ docker compose pull
$ docker compose up --detach


### Initialize database
Expand Down Expand Up @@ -99,15 +99,15 @@ have several options to achieve this:

To stop the instance, run:

$ docker-compose stop
$ docker compose stop

To remove all containers and networks, run:

$ docker-compose down
$ docker compose down

To remove also the database (and lose all your data), run:

$ docker-compose down --volumes
$ docker compose down --volumes



Expand Down Expand Up @@ -139,7 +139,7 @@ instead of the `setup` command. E. g. run:

This command will just rebuild your Docker Compose YAML file.

To get the [defaults](pkg/config/default-config.yml) run:
To get the [defaults](https://github.com/OpenSlides/openslides-manage-service/blob/main/pkg/config/default-config.yml) run:

$ ./openslides config-create-default .

Expand Down Expand Up @@ -170,7 +170,7 @@ To update to the new version, set the new tag, regenerate the compose file and
apply the changes to the containers:

$ ./openslides config --config my-config.yml .
$ docker-compose up --detach
$ docker compose up --detach

Regenerating the compose file is an important step that should be done for every
update. This will ensure that all services will be provided with all necessary
Expand Down Expand Up @@ -285,15 +285,15 @@ are sufficient for you.

To get a dump of your (PostgreSQL) database, run:

$ docker-compose exec --user postgres postgres pg_dump -U openslides --clean > dump.sql
$ docker compose exec --user postgres postgres pg_dump -U openslides --clean > dump.sql

To restore your dump, shut down your instance if it is running, start only the
postgres container and upload your dump:

$ docker-compose down
$ docker-compose up --detach postgres
$ docker-compose exec --no-TTY --user postgres postgres psql -U openslides < dump.sql
$ docker compose down
$ docker compose up --detach postgres
$ docker compose exec --no-TTY --user postgres postgres psql -U openslides < dump.sql

Then restart your instance:

$ docker-compose up --detach
$ docker compose up --detach
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DC_PATH=dev/docker
SCRIPT_PATH=dev/scripts
DC=docker-compose -f $(DC_PATH)/docker-compose.dev.yml
DC=docker compose -f $(DC_PATH)/docker-compose.dev.yml

# Main command: start the dev server
run-dev: | build-dev
Expand All @@ -22,13 +22,13 @@ run-service-tests:
# interfering with your dev database
switch-to-test:
$(DC) stop postgres
docker-compose -f $(DC_PATH)/docker-compose.test.yml up -d postgres-test
docker compose -f $(DC_PATH)/docker-compose.test.yml up -d postgres-test
$(DC) -f $(DC_PATH)/docker-compose.backend.yml up -d backend
$(DC) restart datastore-writer datastore-reader autoupdate vote

# Execute while run-dev is running: Switch back to your dev database
switch-to-dev:
docker-compose -f $(DC_PATH)/docker-compose.test.yml stop postgres-test
docker compose -f $(DC_PATH)/docker-compose.test.yml stop postgres-test
$(DC) up -d postgres backend
$(DC) restart datastore-writer datastore-reader autoupdate vote

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.6
4.1.7
4 changes: 2 additions & 2 deletions dev/localprod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the `config.yml`.

Now run

docker-compose up --build
docker compose up --build

If you run into problems, they may be related to a newer docker(-compose)
version. Try running the following before running the build command again:
Expand All @@ -41,4 +41,4 @@ Access https://localhost:8000/ as you would expect.

To clear the database run

docker-compose down --volumes
docker compose down --volumes
4 changes: 2 additions & 2 deletions dev/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Shorthand to get to a psql shell inside the postgres container.
## `dc-dev.sh`

Shorthand script to not have to type out the whole docker compose command every time one wants to
access a container. Is not a standalone program - supply docker compose commmand and options as args
as you would to `docker-compose`.
access a container. It is not a standalone program - supply docker compose commmand and options as args
as you would to `docker compose`.

## `export-ds.sh`

Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/db.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd "$(dirname $0)"
docker-compose -f ../docker/docker-compose.dev.yml exec datastore-writer psql postgresql://openslides:openslides@postgres/openslides
docker compose -f ../docker/docker-compose.dev.yml exec datastore-writer psql postgresql://openslides:openslides@postgres/openslides
2 changes: 1 addition & 1 deletion dev/scripts/dc-dev.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd "$(dirname $0)"
docker-compose -f ../docker/docker-compose.dev.yml $@
docker compose -f ../docker/docker-compose.dev.yml $@
2 changes: 1 addition & 1 deletion dev/scripts/set-ds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ cd "$(dirname $0)"
# first argument is the example data
DATA=$(cat ${1:-../../openslides-backend/global/data/example-data.json})
./clear-ds.sh
docker-compose -f ../docker/docker-compose.dev.yml exec datastore-writer \
docker compose -f ../docker/docker-compose.dev.yml exec datastore-writer \
bash -c "source export-database-variables.sh; echo '$DATA' > /data.json; export DATASTORE_INITIAL_DATA_FILE=/data.json; python cli/create_initial_data.py"
Loading

0 comments on commit 6b06e27

Please sign in to comment.