Skip to content

Commit c169298

Browse files
committed
.
0 parents  commit c169298

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.8.3-buster
2+
3+
WORKDIR /app
4+
5+
RUN python3 -m venv /opt/venv
6+
7+
RUN /opt/venv/bin/pip install ginza
8+
RUN /opt/venv/bin/pip install Flask
9+
10+
COPY src .
11+
12+
ENV FLASK_APP=server.py
13+
14+
ENTRYPOINT /bin/bash -c "source /opt/venv/bin/activate; flask run --host 0.0.0.0"

docker-compose.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: "3.7"
2+
3+
services:
4+
ginza:
5+
build:
6+
context: .
7+
dockerfile: ./Dockerfile
8+
volumes:
9+
- ./src:/app
10+
networks:
11+
- app_backend
12+
ports:
13+
- 5000:5000
14+
15+
networks:
16+
app_backend:
17+
driver: bridge

src/__pycache__/server.cpython-38.pyc

308 Bytes
Binary file not shown.

src/server.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from flask import Flask
2+
app = Flask(__name__)
3+
4+
@app.route('/')
5+
def hello_world():
6+
return 'Hello, World!'

0 commit comments

Comments
 (0)