-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (31 loc) · 1.06 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
# SPDX-FileCopyrightText: 2024 Deren Vural [email protected]
# SPDX-License-Identifier: MIT
# Base image
FROM alpine:latest
# Author settings
LABEL org.opencontainers.image.authors="Deren Vural [email protected]"
# Set work directory
WORKDIR /usr/src/app
# Set Python environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install python/pip
RUN apk update \
&& apk add --update --no-cache python3 py3-pip
# Set up VENV
RUN python -m venv /usr/src/app/osrs-bluesky-bot
# Install dependancies
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN source /usr/src/app/osrs-bluesky-bot/bin/activate \
&& pip install --upgrade pip \
&& pip install -r /usr/src/app/requirements.txt
# Set environment variables
#(SET BLUESKY_PASSWORD IN FLY)
ENV BLUESKY_USERNAME=osrsbot-unofficial.bsky.social
ENV OSRS_RSS_URL=https://secure.runescape.com/m=news/latest_news.rss?oldschool=true
# Copy over main script
COPY main.py /usr/src/app/main.py
# Copy over entrypoint script
COPY run.sh /usr/src/app/run.sh
# Run
CMD ["sh","/usr/src/app/run.sh"]