diff --git a/README.md b/README.md index 5c842e5..73a7142 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,17 @@ Backend application built with Flask. Database on MariaDB. Depends on FinBIF Laj ## Development setup -- Clone this repository +- Clone this repository `git clone ...` +- Switch to dev branch `git checkout dev` - Optionally change development database password to `docker-entrypoint-initdb.d/init_db.sql` - Set up environment variables to `.env.` and `playwright.example` Use example files as templates. - Build Docker image `docker build -t species-challenge:latest .` -- Startup with `docker-compose up build playwright; docker-compose down;` -- Set up database using `sql/species_challenge_dev.sql`, e.g. via phpMyAdmin +- Startup with one of these commands: + - With Playwright: `docker-compose up build playwright; docker-compose down;` + - Without Playwright: `docker-compose up; docker-compose down;` +- Set up database: + - phpMyAdmin is available at http://localhost:8080 + - Import file from ´./sql/species_challenge_dev.sql´ Site will be visible http://localhost:8081 diff --git a/example.env b/example.env index 159a6f2..fbb84aa 100644 --- a/example.env +++ b/example.env @@ -2,6 +2,7 @@ MYSQL_ROOT_PASSWORD=root_password MYSQL_DATABASE=species_challenge_dev MYSQL_USER=sc_user_dev MYSQL_PASSWORD=sc_password_dev +MYSQL_HOST=db FLASK_SECRET_KEY=secret_key FINBIF_API_TOKEN=token HOST=production-hostname diff --git a/sql/species_challenge_dev.sql b/sql/species_challenge_dev.sql index f9e22c3..3f556aa 100644 --- a/sql/species_challenge_dev.sql +++ b/sql/species_challenge_dev.sql @@ -20,7 +20,7 @@ -- -USE `species_challenge_rahti`; +USE `species_challenge_dev`; -- -- Table structure for table `challenges`