Fix authentication problem
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -159,6 +159,5 @@ cython_debug/
|
|||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
# Database and venv
|
# Database and venv
|
||||||
users.db
|
|
||||||
venv_planner
|
venv_planner
|
||||||
.deployment
|
.deployment
|
||||||
|
|||||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Python: Current File",
|
"name": "Python: Current File",
|
||||||
"type": "python",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${file}",
|
"program": "${file}",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ WORKDIR /app
|
|||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
# Install any needed packages specified in requirements.txt
|
# Install any needed packages specified in requirements.txt
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
# Make port 80 available to the world outside this container
|
# Make port available to the world outside this container
|
||||||
EXPOSE 8000
|
EXPOSE 8001
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class Config(DefaultConfig):
|
|||||||
class ProductionConfig(Config):
|
class ProductionConfig(Config):
|
||||||
SECRET_KEY = '\xacI4\x077\x16?Q\xb4")\xdb\x066\x95\x11i\x0b\x0c&\xb6rP\''
|
SECRET_KEY = '\xacI4\x077\x16?Q\xb4")\xdb\x066\x95\x11i\x0b\x0c&\xb6rP\''
|
||||||
SECURITY_PASSWORD_SALT = '>\xe3\x9bz\xfd\xbc[\xe22\xcfK\xca\x88!\xd8\xd5,\xd0\x95\x0c\x02\xad\xfa\x9d'
|
SECURITY_PASSWORD_SALT = '>\xe3\x9bz\xfd\xbc[\xe22\xcfK\xca\x88!\xd8\xd5,\xd0\x95\x0c\x02\xad\xfa\x9d'
|
||||||
DATABASE_URI = './users.db' # For azure app services. The content under wwwroot is durable, unless you delete your app service.
|
|
||||||
|
|
||||||
class DevelopmentConfig(Config):
|
class DevelopmentConfig(Config):
|
||||||
CONFIRMATATION_EMAIL_ADD= "struebin.patrick@gmail.com"
|
CONFIRMATATION_EMAIL_ADD= "struebin.patrick@gmail.com"
|
||||||
@@ -32,6 +31,6 @@ class MsalDefaulConfig():
|
|||||||
class MsalConfig(MsalDefaulConfig):
|
class MsalConfig(MsalDefaulConfig):
|
||||||
AUTHORITY = "https://login.microsoftonline.com/propedal.at"
|
AUTHORITY = "https://login.microsoftonline.com/propedal.at"
|
||||||
CLIENT_ID = "52f192c4-875d-44a2-b28a-575e920225e5" # client public id (from azure web interface)
|
CLIENT_ID = "52f192c4-875d-44a2-b28a-575e920225e5" # client public id (from azure web interface)
|
||||||
SECRET = "irj8Q~PliZzSe7JnXEaiWKQ6v0CAg1DTZOO~Ccsf" # api secret key (from azure web interface)
|
SECRET = "SHX8Q~4UnmeFzxaK2akoBouMuQBNXgFfDipeXbra" # api secret key (from azure web interface)
|
||||||
USER_ID = "simone.profus@propedal.at"
|
USER_ID = "simone.profus@propedal.at"
|
||||||
CALENDAR_ID = "AAMkADY0MDg1MTVjLTg5ZjItNGQxYS04MGQ3LWY2NjJmYjM0YmZhOQBGAAAAAADXD7SdVoWYQI4RYXbBumMEBwAf_ngZxs71RonY3GuLL8TVAAAAAAEGAAAf_ngZxs71RonY3GuLL8TVAADHFxN2AAA=" # calendar id - determined by /users/id/calendars
|
CALENDAR_ID = "AAMkADY0MDg1MTVjLTg5ZjItNGQxYS04MGQ3LWY2NjJmYjM0YmZhOQBGAAAAAADXD7SdVoWYQI4RYXbBumMEBwAf_ngZxs71RonY3GuLL8TVAAAAAAEGAAAf_ngZxs71RonY3GuLL8TVAADHFxN2AAA=" # calendar id - determined by /users/id/calendars
|
||||||
|
|||||||
BIN
database/users.db
Normal file
BIN
database/users.db
Normal file
Binary file not shown.
BIN
database/users.db-shm
Normal file
BIN
database/users.db-shm
Normal file
Binary file not shown.
0
database/users.db-wal
Normal file
0
database/users.db-wal
Normal file
@@ -1,14 +1,25 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
restart: unless-stopped
|
||||||
- "8000:8000"
|
|
||||||
network_mode: host
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- sqlite-database:/app/database
|
- sqlite-database:/app/database
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
command: sh ./run_production_server.sh
|
command: sh ./run_production_server.sh
|
||||||
|
environment:
|
||||||
|
- VIRTUAL_HOST=planner.propedal.duckdns.org
|
||||||
|
- LETSENCRYPT_HOST=planner.propedal.duckdns.org
|
||||||
|
- LETSENCRYPT_EMAIL=struebin.patrick@gmail.com
|
||||||
|
- VIRTUAL_PORT=8001
|
||||||
|
- NETWORK_ACCESS=external
|
||||||
|
|
||||||
|
networks:
|
||||||
|
- reverseproxy_default
|
||||||
|
- default
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sqlite-database:
|
sqlite-database:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
reverseproxy_default:
|
||||||
|
external: true
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# Available calendar attributes are:
|
# ms cert renewal
|
||||||
|
cert needs renewal every 2 years.
|
||||||
|
go to azure.com -> app registrations > propedal-planner > Certificates
|
||||||
|
|
||||||
|
|
||||||
|
# Available calendar attributes are:
|
||||||
[
|
[
|
||||||
"@odata.etag",
|
"@odata.etag",
|
||||||
"id",
|
"id",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
export FLASK_ENV=production
|
export FLASK_ENV=production
|
||||||
export CONFIG=config.ProductionConfig
|
export CONFIG=config.ProductionConfig
|
||||||
# equivalent to 'from hello import app'
|
gunicorn -w 1 -b :8001 'app:app'
|
||||||
gunicorn 'app:app'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user