Merge pull request #9 from cafrays/PROD

Docker Container Deployment
This commit is contained in:
Takeus authored and GitHub committed 2025-04-01 11:41:28 +02:00
commit 2956b0abed
6 files changed
+36 -2

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
FROM python:3.13.2-alpine3.21
WORKDIR /fipam
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app /fipam/app
COPY instance /fipam/instance
ENV APP_HOME=/fipam
ENV PYTHONPATH=${APP_HOME}
ENV PATH="$PATH:${APP_HOME}/.local/bin"
ENV GUNICORN_CMD_ARGS="--bind=0.0.0.0:5000 --workers=2 --preload"
EXPOSE 5000
ENTRYPOINT ["gunicorn","app:create_app()"]
+7
View File
@@ -14,3 +14,10 @@ _(I'm not an experienced developer, just a tinkerer)_
--- ---
- Installation : [here](install.md) - Installation : [here](install.md)
- Sources : [here](sources.md) - Sources : [here](sources.md)
## Docker Compose
The Docker image has a built in admin account, **PLEASE CHANGE PASSWORD AFTER INITIAL LOG IN**
- Username: admin
- Password: _PleaseChangeMe_
<br>
Use docker-compose.yml file to deploy.
+2 -2
View File
@@ -10,11 +10,11 @@ app_maintenance = False
app_name = 'takeus-ipam' app_name = 'takeus-ipam'
app_version = 'V1.2' app_version = 'V1.2'
app_release_date = '02/2025' app_release_date = '02/2025'
app_url = "http://127.0.0.1" app_url = "http://0.0.0.0"
class Configuration: class Configuration:
# openssl rand -hex 32 # openssl rand -hex 32
SECRET_KEY = 'change_me' SECRET_KEY = '619b2920234c8c472b2a7121c82a5d62ea86a083dc00e2bc9b09b695f00641ea'
# DB CONFIG # DB CONFIG
SQLALCHEMY_DATABASE_URI = 'sqlite:///database.db' SQLALCHEMY_DATABASE_URI = 'sqlite:///database.db'
SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_TRACK_MODIFICATIONS = False
+13
View File
@@ -0,0 +1,13 @@
name: Flask-IPAM
services:
flask-ipam:
image: ghcr.io/cafrays/flask_ipam:v1.2
container_name: flask-ipam
restart: unless-stopped
ports:
- 5000:5000
volumes:
- flask-ipam:/fipam/instance
volumes:
flask-ipam:
+2
View File
@@ -1,3 +1,5 @@
wheel
gunicorn
Flask Flask
Flask-Login Flask-Login
Flask-SQLAlchemy Flask-SQLAlchemy
Regular → Executable
View File
File mode changed.