Skip to content
Snippets Groups Projects
Commit cb45bf4d authored by dcz's avatar dcz
Browse files

Database dir as an argument in docker-compose

parent 7c337331
No related merge requests found
......@@ -6,15 +6,21 @@ In order to run the development environment locally:
1. Make sure you have [Docker Desktop](https://docs.docker.com/desktop/) and [Docker Compose](https://docs.docker.com/compose/) installed.
2. Build and run the project by executing:
./docker/scripts/run-docker
docker-compose stop backend — bo reset_db.sh nie lubi jak coś się łączy do bazki
docker-compose run backend bash — I w nim ./reset_db.sh
./docker/scripts/run-docker -e DATABASE_DIR=<path to database dir in local file system>
3. In order to fulfill database execute belove commands
docker-compose stop backend
docker-compose run backend bash
-> run ./reset_db.sh script in interactive bash
-> exit interactive bash by typing ctrl-d
docker-compose start backend
In order to reinstall a database instance a folder specified by the DATABASE_DIR should be removed.
## Working in the development environment
Whenever you need to establish an interactive bash session in the running applicaiton container, execute:
Whenever you need to establish an interactive bash session in the running application container, execute:
./docker/scripts/docker-bash
......
......@@ -17,7 +17,7 @@ services:
networks:
- app-tier
volumes:
- ./.datastore/postgresql:/var/lib/postgresql/data
- ${DATABASE_DIR}:/var/lib/postgresql/data
backend:
#platform: linux/amd64
......
#!/usr/bin/env bash
set -e
docker-compose up --build
docker-compose up --build $@
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment