Skip to content

Commit

Permalink
\#9
Browse files Browse the repository at this point in the history
  • Loading branch information
aschuma committed May 4, 2019
1 parent 5520664 commit 8cf068c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.gitignore
.idea
README.md
__pycache__
_config.yml
config.py
*.iml
tweet-screnshot.png
venv

18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.7.3

WORKDIR /opt/air_tweets

COPY . .

RUN \
pip install --no-cache-dir -r requirements.txt \
&& mkdir -p /etc/air_tweets \
&& mkdir -p /var/air_tweets \
&& cp config.py-template /etc/air_tweets/config.py

ENV PYTHONPATH .:/etc/air_tweets

VOLUME /etc/air_tweets /var/air_tweets

CMD [ "python", "./tweet.py" ]

2 changes: 1 addition & 1 deletion config.py-template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# database, last tweet timestamp
conf_storage = "/tmp/.air_tweet"
conf_storage = "/var/air_tweets/air_tweet"

# the sensor ids
conf_particle_sensor_id = 7561
Expand Down

0 comments on commit 8cf068c

Please sign in to comment.