summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore6
-rw-r--r--Dockerfile12
-rw-r--r--requirements.txt7
3 files changed, 25 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..1ac5734
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,6 @@
+.dockerignore
+.git
+.gitignore
+**/__pycache__
+*.pyc
+pastepy/pastepy.cfg
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..cd391ae
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,12 @@
+FROM python:3.9 as pastepy
+
+WORKDIR /app
+COPY requirements.txt .
+
+RUN pip install --no-cache-dir -r requirements.txt
+
+COPY . .
+
+EXPOSE 8000
+
+CMD ["gunicorn", "-b", ":8000", "-w", "2", "-k", "gevent", "pastepy:app"]
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..c9c73f0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,7 @@
+flask
+gevent
+gunicorn
+markdown
+psycopg2-binary
+pygments
+sqlalchemy