Skip to content

Commit f9fb841

Browse files
committed
Add Dockerfile and uwsgi.ini
1 parent 04cf115 commit f9fb841

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile*
4+
docker-compose*
5+
.dockerignore
6+
.git
7+
.gitignore
8+
README.md
9+
LICENSE
10+
.vscode
11+
env

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Pull a pre-built alpine docker image with nginx and python3 installed
2+
FROM tiangolo/uwsgi-nginx:python3.6-alpine3.7
3+
4+
ENV LISTEN_PORT=8000
5+
EXPOSE 8000
6+
7+
# Copy the app files to a folder and run it from there
8+
WORKDIR /app
9+
ADD . /app
10+
11+
RUN python3 -m pip install -r requirements.txt
12+
CMD ["uwsgi", "uwsgi.ini"]

uwsgi.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[uwsgi]
2+
chdir=.
3+
module=web_project.wsgi:application
4+
protocol=http
5+
env=DJANGO_SETTINGS_MODULE=web_project.settings
6+
socket=127.0.0.1:8000
7+
uid=1000
8+
master=true
9+
plugins=python3
10+

0 commit comments

Comments
 (0)