Skip to content

Commit 75d7d7c

Browse files
authored
Merge pull request #186 from jafnhaar/master
added Dockerfile for martor-demo
2 parents d254ba2 + a2b7225 commit 75d7d7c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM alpine:3.16.0
2+
3+
WORKDIR /app
4+
5+
RUN set -xe;
6+
7+
COPY . .
8+
9+
RUN apk add --no-cache python3 py3-pip tini; \
10+
pip install --upgrade pip setuptools-scm; \
11+
python3 setup.py install; \
12+
python3 martor_demo/manage.py makemigrations; \
13+
python3 martor_demo/manage.py migrate; \
14+
addgroup -g 1000 appuser; \
15+
adduser -u 1000 -G appuser -D -h /app appuser; \
16+
chown -R appuser:appuser /app
17+
18+
USER appuser
19+
EXPOSE 8000/tcp
20+
ENTRYPOINT [ "tini", "--" ]
21+
CMD [ "python3", "/app/martor_demo/manage.py", "runserver", "0.0.0.0:8000" ]

docker-compose.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: '3.5'
2+
services:
3+
web:
4+
build: .
5+
ports:
6+
- "8000:8000"
7+
container_name: martor_demo
8+
restart: unless-stopped

0 commit comments

Comments
 (0)