first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# syntax=docker/dockerfile:1.4
|
||||
FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip3 install -r requirements.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
|
||||
ENTRYPOINT ["python3"]
|
||||
CMD ["app.py"]
|
||||
|
||||
FROM builder as dev-envs
|
||||
|
||||
RUN <<EOF
|
||||
apk update
|
||||
apk add git
|
||||
EOF
|
||||
|
||||
RUN <<EOF
|
||||
addgroup -S docker
|
||||
adduser -S --shell /bin/bash --ingroup docker vscode
|
||||
EOF
|
||||
# install Docker tools (cli, buildx, compose)
|
||||
COPY --from=gloursdocker/docker / /
|
||||
@@ -0,0 +1,9 @@
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello():
|
||||
return "Hello World!"
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=8000)
|
||||
@@ -0,0 +1,15 @@
|
||||
flask
|
||||
Flask-SQLAlchemy==3.0.3
|
||||
gunicorn==20.1.0
|
||||
psycopg2-binary==2.9.6
|
||||
flask-smorest==0.42.3
|
||||
python-dotenv
|
||||
pyjwt
|
||||
pillow
|
||||
flask-cors
|
||||
pandas
|
||||
flasgger
|
||||
sqlalchemy
|
||||
flask-socketio
|
||||
Flask-Mail
|
||||
pycountry
|
||||
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
digifi-core:
|
||||
build:
|
||||
context: app
|
||||
target: builder
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./:/app
|
||||
ports:
|
||||
- '6330:8000'
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.5.1.0/24
|
||||
Reference in New Issue
Block a user