Skip to content

Commit

Permalink
forgot docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
avdb13 committed Feb 21, 2024
1 parent a58d875 commit 6cdad0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ dotenv:

# Dump database to a file
backup_db:
docker compose exec -T synapse_database \
DOCKER_USER={{docker_user}} docker compose exec -T synapse_database \
pg_dumpall -c -U synapse_user > ./dump.sql

# Restore database from a file
restore_db:
cat ./dump.sql | docker compose exec -T synapse_database \
cat ./dump.sql | DOCKER_USER={{docker_user}} docker compose exec -T synapse_database \
psql -U synapse_user -d synapse

# Nuke database
nuke_db:
docker compose exec -T synapse_database \
DOCKER_USER={{docker_user}} docker compose exec -T synapse_database \
psql -U synapse_user -d synapse -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"

# Generates the synapse configuration file and saves it
Expand Down Expand Up @@ -55,16 +55,16 @@ get_access_token:

# Runs backend dependency services
backend: dotenv
docker compose up --build
DOCKER_USER={{docker_user}} docker compose up --build

# Stops backend dependency services
stop:
docker compose down
DOCKER_USER={{docker_user}} docker compose down

# Removes oll Docker related config, volumes and containers for this project
clear: stop
docker compose rm --all --force --volumes --stop
docker volume rm commune_synapse_database || true
DOCKER_USER={{docker_user}} docker compose rm --all --force --volumes --stop
DOCKER_USER={{docker_user}} docker volume rm commune_synapse_database || true

# Runs all the tests from the `test` package. Optionally runs a single one if name pattern is provided
e2e *args='':
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ services:

synapse:
image: 'ghcr.io/element-hq/synapse:v1.100.0'
user: '${DOCKER_USER}'
ports:
- '8008:8008'
- '8448:8448'
Expand Down

0 comments on commit 6cdad0b

Please sign in to comment.