mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 08:44:28 +01:00
Merge N2
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
ca85ccbb5a
commit
90b26400ec
2
Makefile
2
Makefile
@ -20,7 +20,7 @@
|
||||
|
||||
DOCKER := docker
|
||||
|
||||
PROFILE := db wordpress webserver certbot phpmyadmin flask_website qbittorrent
|
||||
PROFILE := wp_db wordpress webserver certbot phpmyadmin flask_website flask_db qbittorrent
|
||||
PROFILE_CMD := $(addprefix --profile ,$(PROFILE))
|
||||
|
||||
COMPOSE_FILE := docker-compose.yml
|
||||
|
@ -22,8 +22,7 @@ services:
|
||||
image: mariadb:10.10.2
|
||||
container_name: wp_db
|
||||
profiles:
|
||||
- db
|
||||
- wordpress
|
||||
- wp_db
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- env/wp_database.env
|
||||
@ -51,14 +50,41 @@ services:
|
||||
|
||||
flask_website:
|
||||
build:
|
||||
context: ./flask
|
||||
context: ./bensuperpc_website
|
||||
dockerfile: Dockerfile
|
||||
container_name: flask_website
|
||||
profiles:
|
||||
- flask_website
|
||||
depends_on:
|
||||
- flask_db
|
||||
volumes:
|
||||
- ./flask:/app:rw
|
||||
- ./bensuperpc_website:/app:rw
|
||||
environment:
|
||||
FLASK_DEBUG: "${FLASK_DEBUG:-1}"
|
||||
POSTGRES_URL: "${POSTGRES_URL:-flask_db:5432}"
|
||||
POSTGRES_USER: "${POSTGRES_USER:-postgres}"
|
||||
POSTGRES_PW: "${POSTGRES_PW:-postgres}"
|
||||
POSTGRES_DB: "${POSTGRES_DB:-website}"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 5000:5000
|
||||
networks:
|
||||
- app-network
|
||||
flask_db:
|
||||
image: postgres:latest
|
||||
container_name: flask_db
|
||||
profiles:
|
||||
- flask_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_HOST_AUTH_METHOD: "${POSTGRES_HOST_AUTH_METHOD:-trust}"
|
||||
POSTGRES_USER: "${POSTGRES_USER:-postgres}"
|
||||
POSTGRES_PASSWORD: "${POSTGRES_PW:-postgres}"
|
||||
POSTGRES_DB: "${POSTGRES_DB:-website}"
|
||||
# ports:
|
||||
# - 5432:5432
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- app-network
|
||||
qbittorrent:
|
||||
@ -117,6 +143,9 @@ volumes:
|
||||
downloads:
|
||||
name: downloads
|
||||
|
||||
postgres-data:
|
||||
name: postgres-data
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
|
@ -1,12 +0,0 @@
|
||||
ARG DOCKER_IMAGE=python:3.11-buster
|
||||
FROM $DOCKER_IMAGE
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["uwsgi", "app.ini"]
|
Binary file not shown.
@ -1,20 +0,0 @@
|
||||
[uwsgi]
|
||||
plugins = python
|
||||
|
||||
wsgi-file = wsgi.py
|
||||
callable = app
|
||||
# Or: module = wsgi:app
|
||||
|
||||
socket = :8080
|
||||
# Or: socket = flask_server.sock
|
||||
chmod-socket = 660
|
||||
|
||||
processes = 8
|
||||
threads = 2
|
||||
master = true
|
||||
|
||||
vacuum = true
|
||||
die-on-term = true
|
||||
# enable-threads = true #enable threads support
|
||||
|
||||
env = LANG=en_US.UTF-8
|
@ -1,12 +0,0 @@
|
||||
requests
|
||||
|
||||
flask
|
||||
flask-babel
|
||||
flask-login
|
||||
flask-sqlalchemy
|
||||
flask-assets
|
||||
flask-wtf
|
||||
flask-mail
|
||||
|
||||
|
||||
uwsgi
|
@ -1,9 +0,0 @@
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
return "<h1 style='color:blue'>Hello There!</h1>"
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host='0.0.0.0')
|
@ -1,4 +0,0 @@
|
||||
from website import app
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0")
|
Loading…
Reference in New Issue
Block a user