Skip to content

Commit

Permalink
Check and update local dev setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkohei13 committed Jul 16, 2024
1 parent fbe2f73 commit 95e2349
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sql/species_challenge_dev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--


USE `species_challenge_rahti`;
USE `species_challenge_dev`;

--
-- Table structure for table `challenges`
Expand Down

0 comments on commit 95e2349

Please sign in to comment.