This commit is contained in:
2026-04-13 11:16:13 +02:00
parent bbd5690d72
commit 30125aa77b
4 changed files with 41 additions and 19 deletions

View File

@@ -1,18 +1,17 @@
# Database — din MySQL server
DATABASE_URL=mysql+pymysql://BRUGER:KODEORD@mysql.ckvist.lan:3306/linedance
# Database
DATABASE_URL=mysql+pymysql://linedanceplayer:KODEORD@mysql.ckvist.lan:3306/linedanceplayer
# JWT — generer med: python -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=skift-denne-til-en-lang-tilfaeldig-streng-mindst-32-tegn
# Sikkerhed — generer med: python3 -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=skift-denne-til-en-rigtig-nøgle
ACCESS_TOKEN_EXPIRE_MINUTES=10080
# Mail — din SMTP server
MAIL_HOST=din-smtp-server
# Mail
MAIL_HOST=mail.miraca.dk
MAIL_PORT=587
MAIL_FROM=noreply@din-domæne.dk
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=noreply@linedanceplayer.dk
MAIL_USERNAME=noreply@linedanceplayer.dk
MAIL_PASSWORD=skift-dette
MAIL_TLS=true
# URL til verificerings-links i mails
# Skal være den adresse din Docker-container er tilgængelig på
BASE_URL=http://din-server-ip:8000
# URL til denne server (bruges i verificerings-mails)
BASE_URL=http://localhost:8000

18
linedance-api/.gitignore vendored Normal file
View File

@@ -0,0 +1,18 @@
# Python
__pycache__/
*.py[cod]
*.pyo
.Python
venv/
.venv/
*.egg-info/
# Environment
.env
# IDE
.vscode/
.idea/
# Logs
*.log

View File

@@ -3,16 +3,21 @@ services:
api:
build: .
restart: always
ports:
- "8000:8000"
expose:
- "8000"
env_file:
- .env
volumes:
- .:/app
networks:
- linedance
adminer:
image: adminer
restart: always
ports:
- "8080:8080"
expose:
- "8080"
networks:
- linedance
networks:
linedance:
name: linedance

View File

@@ -21,4 +21,4 @@ except Exception as e:
sleep 2
done
exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
exec uvicorn app.main:app --host 0.0.0.0 --port 8000