Skip to content

Commit

Permalink
chore: overhaul (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeriyoshi authored Aug 24, 2024
1 parent 910c270 commit de88070
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "OpenJCDK",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python"
]
}
},
"initializeCommand": "if ! test -f \".env\"; then cp \".env.example\" \".env\"; fi",
"runArgs": ["--env-file", ".env"],
"onCreateCommand": "apk add --no-cache \"git\" \"openssh\""
}
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY=
GOOGLE_DRIVE_DIRECTORY_ID=
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Alpine is not the best option. But it is good enough.
FROM python:3.12-alpine
FROM python:3.12.5-alpine3.20

ENV PYTHONUNBUFFERED 1

COPY . ./
COPY ./bot.py /application/bot.py
COPY ./requirements.txt /application/requirements.txt

WORKDIR /application

RUN pip install --no-cache-dir -r "requirements.txt"

CMD /usr/local/bin/python "bot.py"
CMD /usr/local/bin/python "/application/bot.py"

0 comments on commit de88070

Please sign in to comment.