docker ready deployment
This commit is contained in:
2
app/.gitignore
vendored
Normal file
2
app/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.env.db
|
||||
.env.web
|
||||
18
app/Dockerfile
Normal file
18
app/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the entire project
|
||||
COPY . ./app/
|
||||
|
||||
# Expose Gunicorn port
|
||||
EXPOSE 8000
|
||||
|
||||
# Gunicorn command for a package structure
|
||||
# "app:create_app()" assumes you have a factory function in __init__.py
|
||||
# If your Flask instance is just named 'app' inside __init__.py, use "app:app"
|
||||
CMD ["gunicorn", "--preload", "-w", "4", "-b", "0.0.0.0:8000", "app:create_app()"]
|
||||
@@ -3,12 +3,11 @@ import os
|
||||
class Config:
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
|
||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
|
||||
'sqlite:///' + os.path.join(basedir, '../instance/registration.db')
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
||||
MAIL_SERVER = 'mail.your-server.de'
|
||||
# Email Settings (Update these!)
|
||||
MAIL_SERVER = os.environ.get('MAIL_SERVER')
|
||||
MAIL_PORT = 587
|
||||
MAIL_USE_TLS = True
|
||||
MAIL_USERNAME = os.environ.get('EMAIL_USER')
|
||||
48
app/requirements.txt
Normal file
48
app/requirements.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv export --format requirements-txt -o requirements.txt --no-hashes
|
||||
blinker==1.9.0
|
||||
# via
|
||||
# flask
|
||||
# flask-mail
|
||||
click==8.3.1
|
||||
# via flask
|
||||
colorama==0.4.6 ; sys_platform == 'win32'
|
||||
# via click
|
||||
dnspython==2.8.0
|
||||
# via email-validator
|
||||
email-validator==2.3.0
|
||||
# via register-website
|
||||
flask==3.1.2
|
||||
# via
|
||||
# flask-mail
|
||||
# flask-sqlalchemy
|
||||
# register-website
|
||||
flask-mail==0.10.0
|
||||
# via register-website
|
||||
flask-sqlalchemy==3.1.1
|
||||
# via register-website
|
||||
greenlet==3.3.0 ; platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'
|
||||
# via sqlalchemy
|
||||
gunicorn==23.0.0
|
||||
# via register-website
|
||||
idna==3.11
|
||||
# via email-validator
|
||||
itsdangerous==2.2.0
|
||||
# via flask
|
||||
jinja2==3.1.6
|
||||
# via flask
|
||||
markupsafe==3.0.3
|
||||
# via
|
||||
# flask
|
||||
# jinja2
|
||||
# werkzeug
|
||||
packaging==25.0
|
||||
# via gunicorn
|
||||
psycopg2-binary==2.9.11
|
||||
# via register-website
|
||||
sqlalchemy==2.0.45
|
||||
# via flask-sqlalchemy
|
||||
typing-extensions==4.15.0
|
||||
# via sqlalchemy
|
||||
werkzeug==3.1.4
|
||||
# via flask
|
||||
Reference in New Issue
Block a user