mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-07-04 17:21:43 +02:00
Integrate dockerized Mongodb configuration
This commit is contained in:
24
backend/.vscode/launch.json
vendored
24
backend/.vscode/launch.json
vendored
@ -9,6 +9,7 @@
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"preLaunchTask": "Launch MongoDB",
|
||||
"env": {
|
||||
"FLASK_APP": "app/main.py",
|
||||
"FLASK_ENV": "development",
|
||||
@ -19,7 +20,28 @@
|
||||
"--no-debugger",
|
||||
"--no-reload"
|
||||
],
|
||||
"jinja": true
|
||||
"jinja": true,
|
||||
"postDebugTask": "Stop MongoDB"
|
||||
},
|
||||
{
|
||||
"name": "Python: Flask (open to world)",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "flask",
|
||||
"preLaunchTask": "Launch MongoDB",
|
||||
"env": {
|
||||
"FLASK_APP": "app/main.py",
|
||||
"FLASK_ENV": "development",
|
||||
"FLASK_DEBUG": "0"
|
||||
},
|
||||
"args": [
|
||||
"run",
|
||||
"--no-debugger",
|
||||
"--no-reload",
|
||||
"--host=0.0.0.0"
|
||||
],
|
||||
"jinja": true,
|
||||
"postDebugTask": "Stop MongoDB"
|
||||
}
|
||||
]
|
||||
}
|
50
backend/.vscode/tasks.json
vendored
Normal file
50
backend/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Launch MongoDB",
|
||||
"type": "shell",
|
||||
"command": "docker-compose -f ${workspaceFolder}/docker/docker-compose.dev.yml up",
|
||||
"isBackground": true,
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": "."
|
||||
}
|
||||
}
|
||||
],
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": true
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"label": "Stop MongoDB",
|
||||
"type": "shell",
|
||||
"command": "docker-compose -f ${workspaceFolder}/docker/docker-compose.dev.yml stop"
|
||||
},
|
||||
{
|
||||
"label": "Reset MongoDB",
|
||||
"type": "shell",
|
||||
"command": "docker-compose -f ${workspaceFolder}/docker/docker-compose.dev.yml rm -sf",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
11
backend/docker/Dockerfile
Normal file
11
backend/docker/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM tiangolo/uwsgi-nginx-flask:python3.7
|
||||
|
||||
RUN pip install requests
|
||||
|
||||
RUN pip install pandas
|
||||
|
||||
RUN pip install Flask-BasicAuth
|
||||
|
||||
RUN pip install bs4
|
||||
|
||||
COPY ../app /app
|
14
backend/docker/docker-compose.dev.yml
Normal file
14
backend/docker/docker-compose.dev.yml
Normal file
@ -0,0 +1,14 @@
|
||||
version: '2'
|
||||
services:
|
||||
mongo:
|
||||
extends:
|
||||
file: docker-compose.yml
|
||||
service: mongo
|
||||
|
||||
mongo-express:
|
||||
depends_on:
|
||||
- mongo
|
||||
image: mongo-express
|
||||
restart: always
|
||||
ports:
|
||||
- "8081:8081"
|
12
backend/docker/docker-compose.yml
Normal file
12
backend/docker/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '2'
|
||||
services:
|
||||
mongo:
|
||||
image: mongo
|
||||
restart: always
|
||||
ports:
|
||||
- "27017:27017"
|
||||
|
||||
backend:
|
||||
depends_on:
|
||||
- mongo
|
||||
build: .
|
Reference in New Issue
Block a user