-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
25 lines (17 loc) · 926 Bytes
/
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
FROM python:3.8
WORKDIR /home/slack-standup/
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . /home/slack-standup/
ENV SLACK_SIGNING_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ENV SLACK_API_TOKEN=xoxb-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ENV SQLALCHEMY_DATABASE_URI="sqlite:////home/slack-standup/standup.db"
ENV FLASK_APP=app
ENV REDIS_HOST=localhost
ENV REDIS_PORT=6379
ENV ENVIRONMENT=PROD
RUN flask db stamp head
RUN flask db migrate
RUN flask db upgrade
CMD ["uwsgi", "--http-socket", ":5000", "--enable-threads", "--threads", "4", "--module", "app:create_app()", "--workers", "2", "--buffer-size", "32768"]
# docker run -p 5000:5000 -e SQLALCHEMY_DATABASE_URI=sqlite:////home/slack-standup/standup.db -e STANDUP_CHANNEL_ID=C0XXXXXXXXX -e SLACK_API_TOKEN=xoxb-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -e SLACK_SIGNING_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -i -t standup