Docker compose. dev.yml erstellt

This commit is contained in:
Nirodan
2025-06-17 10:43:22 +02:00
parent 2961081c06
commit b6399f8b52
3 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -157,4 +157,4 @@ def hash_md5():
if __name__ == '__main__': if __name__ == '__main__':
os.makedirs("config", exist_ok=True) os.makedirs("config", exist_ok=True)
app.run(host='0.0.0.0', port=5000) app.run(host='0.0.0.0', port=5000, debug=True) # debug=True nur für Entwicklung, nicht in Produktion verwenden!
+13
View File
@@ -0,0 +1,13 @@
services:
tools:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
volumes:
- ./backend:/backend
- ./frontend:/frontend
- ./backend/config:/config
working_dir: /app/backend
command: python app.py
+1 -1
View File
@@ -9,7 +9,7 @@ function LoginForm() {
const login = async () => { const login = async () => {
try { try {
const res = await axios.post('/login', { username, password }); // ruft POST /api/login auf const res = await axios.post('/api/login', { username, password });
localStorage.setItem('token', res.data.token); localStorage.setItem('token', res.data.token);
localStorage.setItem('role', res.data.role); localStorage.setItem('role', res.data.role);
navigate('/'); navigate('/');