Docker compose. dev.yml erstellt
This commit is contained in:
+1
-1
@@ -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!
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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('/');
|
||||||
|
|||||||
Reference in New Issue
Block a user