-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
57 lines (49 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Dockerfile
FROM python:3.8-slim-buster
LABEL MAINTAINER="Raskitoma.com/EAJ"
LABEL VERSION="1.0"
LABEL LICENSE="GPLv3"
LABEL DESCRIPTION="Raskitoma-RskCore"
# installing locales
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
# setting env vars
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONUNBUFFERED=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV TZ=America/New_York
ENV FLASK_APP=entrypoint
ENV APP_SETTINGS_MODULE=config.dev
# create required folders
RUN mkdir -p /app/db
RUN mkdir -p /app/media
RUN mkdir -p /app/media/uploads
RUN mkdir -p /app/app
RUN mkdir -p /app/config
RUN mkdir -p /app/app/rskcore
RUN mkdir -p /app/app/templates
RUN mkdir -p /app/scheduler
RUN mkdir -p /app/migrations
# setting workdir
WORKDIR /app
# copy requirements file
COPY requirements.txt /app/requirements.txt
# installing needed python libraries
RUN pip3 install -r requirements.txt
#
# copying required files
COPY entrypoint.sh /app/
COPY *.py /app/
COPY app /app/app
COPY config /app/config
COPY scheduler /app/scheduler
COPY migrations /app/migrations
# setting permissions to entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Exposing main port
EXPOSE 5000
# Startup
# CMD ["./entrypoint.sh"]
CMD ["sh", "-c", "python3 -m flask run --host 0.0.0.0 --port 5000"]