Skip to content

Commit 6ba0f4d

Browse files
committedDec 21, 2022
Merge (and add type tests etc.)
1 parent f3cb57d commit 6ba0f4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+842
-242
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
main/__pycache__/
22
pigscanfly/__pycache__/
3-
main/migrations/__pycache__/
3+
main/migrations/__pycache__/
4+
db.sqlite3

‎Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM python:3.9-buster
2+
3+
# install nginx
4+
RUN apt-get update && apt-get install nginx vim emacs -y --no-install-recommends
5+
COPY /conf/nginx.default /etc/nginx/sites-available/default
6+
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
7+
&& ln -sf /dev/stderr /var/log/nginx/error.log
8+
9+
# copy source and install dependencies
10+
RUN mkdir -p /opt/app
11+
RUN mkdir -p /opt/app/pip_cache
12+
COPY main /opt/app/
13+
COPY static /opt/app/
14+
COPY pigscanfly /opt/app/
15+
COPY requirements.txt /opt/apt
16+
COPY scripts/start-server.sh /opt/app
17+
WORKDIR /opt/app
18+
RUN pip install --upgrade pip && pip install -r requirements.txt --no-cache-dir
19+
RUN chown -R www-data:www-data /opt/app
20+
21+
# start server
22+
EXPOSE 8020
23+
STOPSIGNAL SIGTERM
24+
CMD ["/opt/app/start-server.sh"]

0 commit comments

Comments
 (0)
Please sign in to comment.