Go to file
2024-05-26 11:11:54 +02:00
app sort vehicles by last activity 2024-05-25 17:53:51 +02:00
compose_config added demo config 2016-05-26 13:54:51 +02:00
database_upgrades vehicles can now be deactivated 2021-06-20 08:43:46 +02:00
tests worked on tests 2016-05-28 18:59:23 +02:00
.gitattributes add gitattributes to handle line ending settings and expose ports on docker compose 2016-08-28 15:45:08 +02:00
.gitignore add sqlite files to gitignore 2016-08-07 13:19:26 +02:00
config.py update db conf in production 2021-12-21 16:23:15 +00:00
create_icons.sh introduces modules 2016-04-23 23:08:39 +02:00
docker-compose.yml add gitattributes to handle line ending settings and expose ports on docker compose 2016-08-28 15:45:08 +02:00
Dockerfile changed base image 2021-05-08 19:32:01 +02:00
icon_orig.png tuned apple icon 2015-03-22 11:02:59 +01:00
main.py DEBUG flag can now be set via config and environment 2017-11-07 22:31:31 +01:00
README.md first shot 2021-06-18 19:25:33 +02:00
requirements.txt pin werkzeug to version 2.2.2 to prevent incompatibilities 2024-05-17 10:43:58 +02:00

How to build & run

build

docker build --tag=$(basename $PWD) .

general configuration

Look at app/config/email.py.example for the configuration of the parameters required for sending emails. Copy the file as email.py to a folder that will serve as configuration directory and fill in the information. The directory will be used as volume during container operation.

start database

docker run --name pitstops_db -e MYSQL_ROOT_PASSWORD=$SOMESECUREPASSWORD$ -e MYSQL_DATABASE=pitstops -d mysql:latest

or

docker run --name pitstops_db -e MYSQL_ROOT_PASSWORD=$SOMESECUREPASSWORD$ -e MYSQL_DATABASE=pitstops -d mariadb:latest

Database migrations

From Cathrine to Master:

ALTER TABLE pitstop ADD COLUMN costs DECIMAL(5,2) NOT NULL DEFAULT 0.0 AFTER vehicle_id;

run in development

Include the development version of the code as volume, so the app gets reloaded automatically. The sqlite file will be stored in tmp so it can be inspected with tools like sqlite3. The switch DEBUG enables debugging during development.

docker run --rm --name rollerverbrauch -ti -v $PWD/app:/app -v $PWD/data:/data -p 5000:5000 -e SECURITY_PASSWORD_SALT=XXX -e SECRET_KEY=XXX -e MAIL_SERVER=XXX -e MAIL_USERNAME=XXX -e MAIL_PASSWORD=XXX rollerverbrauch

run in production

docker run --name pitstops -tid -e PROXY_DATA=server_names:ps.lusiardi.de,port:5000 --link pitstops_db:database -e SECURITY_PASSWORD_SALT=XXX -e SECRET_KEY=XXX -e MAIL_SERVER=XXX -e MAIL_USERNAME=XXX -e MAIL_PASSWORD=XXX rollerverbrauch:catherine