-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improve docker compose to use volumes
- Loading branch information
Showing
12 changed files
with
64 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,3 @@ README.md | |
requirements.txt | ||
.env.example | ||
.env | ||
|
||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
# Please provided relative paths with ./ or things can break :) | ||
|
||
SESSION_DIR="data/flask_sessions/" | ||
SESSION_LIFETIME="10800" # 3 hours | ||
SESSION_LIFETIME="10800" | ||
|
||
DATABASE_PATH="data/hackerschool.sqlite3" | ||
DATABASE_PATH="data/db/hackerschool.sqlite3" | ||
ROLES_PATH="data/roles.json" | ||
PHOTOS_DIR="data/photos/" | ||
MAX_FILE_UPLOAD_LENGTH="16777216" # 16 MiB | ||
STATIC_DIR="data/static/" | ||
MAX_FILE_UPLOAD_LENGTH="16777216" | ||
|
||
LOG_LEVEL="INFO" | ||
LOGS_PATH="data/logs/app.log" | ||
|
||
ADMIN_USERNAME="admin" | ||
ADMIN_PASSWORD="admin" | ||
|
||
FRONTEND_URI="http://localhost:3000" | ||
FRONTEND_ORIGIN="http://localhost:3000" | ||
|
||
OAUTH_CALLBACK="" | ||
FENIX_REDIRECT_URL="" | ||
CLIENT_ID="" | ||
CLIENT_SECRET="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
services: | ||
app: | ||
hs-api: | ||
build: . | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ${DATABASE_PATH}:/hs-api/data/hackerschool.sqlite3 | ||
- ${ROLES_PATH}:/hs-api/data/roles.json | ||
- ${SESSION_DIR}:/hs-api/data/flask_sessions/ | ||
- ${PHOTOS_DIR}:/hs-api/data/photos | ||
- ${LOGS_PATH}:/hs-api/data/logs/log.app | ||
- hs_db:/hs-api/data/db | ||
- hs_static:/hs-api/data/static/ | ||
- hs_logs:/hs-api/data/logs/ | ||
environment: | ||
- DATABASE_PATH=/hs-api/data/hackerschool.sqlite3 | ||
- ROLES_PATH=/hs-api/data/roles.json | ||
- SESSION_DIR=/hs-api/data/flask_sessions/ | ||
- PHOTOS_DIR=/hs-api/data/photos/ | ||
- LOGS_PATH=/hs-api/data/logs/app.log | ||
- LOG_LEVEL=${LOG_LEVEL} | ||
- SESSION_LIFETIME=${SESSION_LIFETIME} | ||
- MAX_FILE_UPLOAD_LENGTH=${MAX_FILE_UPLOAD_LENGTH} | ||
- FRONTEND_URI=${FRONTEND_URI} | ||
- DATABASE_PATH=data/db/hackerschool.sqlite3 | ||
- STATIC_DIR=data/static/ | ||
- ROLES_PATH=data/roles.json | ||
- SESSION_DIR=data/flask_sessions/ | ||
- LOGS_PATH=data/logs/app.log | ||
- LOG_LEVEL=INFO | ||
- MAX_FILE_UPLOAD_LENGTH=16777216 | ||
- CLIENT_ID= | ||
- CLIENT_SECRET= | ||
- FENIX_REDIRECT_URL= | ||
|
||
volumes: | ||
hs_db: | ||
hs_static: | ||
hs_logs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /bin/sh | ||
|
||
flask db upgrade | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters