Today we want to show you how you can install our systems on your own machine.
Prerequisites: docker, android phone
Step 1: setup api and webservice
Note: we are storing all container data under /docker/*service* you may edit this path to your liking.
Api webservice and database will need to share a network:
docker network create web
For the api you will need a postgres database, we are using the following docker-compose file: https://gitlab.maphynn.de/snippets/1
In pgadmin create the role “api” with all rights and create a new database called ‘maphynn’ and initialize it with this sql script.
Then you have to login to our registry:
docker login https://registry.maphynn.de
The api stores some config in a .env file with the following content:
The JWT_TOKEN_SECRET is a password that is used to encrypt the JWT that is responsible for verifying requests. You can use any password you like, but we recommend a minimum length of 16 characters.
The BACKDOOR_HASH_KEY is a Bcrypt Hash which you can create here, just enter any password for Encrypt and leave the rounds at 12. Enter the hashed key as BACKDOOR_HASH_KEY. This password is used for secure communication between webservices and the api.
And run the image:
docker run --restart unless-stopped -d --name maphynn_api --net=
web-v /docker/.env:/usr/src/app/.env -v /docker/api/images/profile_pictures:/usr/src/app/static/images/profile_pictures -p 8083:1234 registry.maphynn.de/maphynn/api:development
The webservice also has a .env:
In the LOCAL_KEY, enter the clear password which you have encrypted with Bcrypt.
and can be started with this command:
docker run --restart unless-stopped -d --name maphynn_webservice --net=
web-v /docker/.webenv:/usr/src/app/.env -p 8082:1234 registry.maphynn.de/maphynn/webservice:development
Now we can start the website:
docker run --restart unless-stopped -d --name maphynn_website -p 8081:80 registry.maphynn.de/maphynn/website:development