A file synchronisation service to keep a directory in sync across multiple devices.
-
Clone the repository and create a file named "db_password.txt" in
fss/app/
. This will hold the password to your database.
-
Create a .env file under fss/. In this file, define the following environment variables.
DB_USER=postgres (This must be postgres and shouldn't be changed)
DB_PASSWORD= (This must be identical to the password defined in db_password.txt)
DB_HOST=db (This must be db and shouldn't be changed)
DB_PORT=5432 (This can be any valid port but 5432 is the convention for a postgres database. If you decide to change it to another port number, you will also need to modify the docker-compose.yml file, specifically the ports property under the db service)
DB_NAME=fss (This must be fss)
USERSPACES= (This can be any valid path within the backend container)
-
Run the following command from within the fss directory
docker compose up
-
The services should be up and the api endpoints can now be accessed at "localhost/docs"
You may face an issue described in the following thread: https://stackoverflow.com/questions/76781095/how-do-i-fix-scram-authentication-errors-when-connecting-dbeaver-to-a-docker-pos
To solve this:
-
Delete the volumes that were created for the services.
-
Run the following command to start the database service:
docker compose up db
-
Once the db service is up, edit the pg_hba.conf to allow all connections from all IPv4 addresses.
-
Restart the db service.
-
Connect to postgres. You will not be prompted for a password.
-
Reset the password for the postgres user. The password must be identical to the password present in db_password.txt.
-
Change the allowed IPv4 addresses back to its default value in pg_hba.conf.
-
Restart the db service. Run
docker compose up
and the backend will now be able to access the database.