-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94e5fce
commit fd15ba8
Showing
7 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM ubuntu:latest | ||
|
||
WORKDIR /opt | ||
COPY . . | ||
|
||
RUN apt update | ||
RUN apt upgrade -y | ||
RUN apt install -y python3 python3-pip wget | ||
|
||
RUN pip install -r requirements.txt | ||
|
||
RUN wget https://github.com/caddyserver/caddy/releases/download/v2.5.1/caddy_2.5.1_linux_amd64.tar.gz | ||
RUN tar -xzvf caddy_2.5.1_linux_amd64.tar.gz | ||
RUN rm caddy_2.5.1_linux_amd64.tar.gz | ||
|
||
ENTRYPOINT ["sh", "-c", "/opt/heroku_startup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build: | ||
docker: | ||
web: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Start the services in the background | ||
python3 -m uvicorn weatherapi:app --port=8080 & | ||
python3 bot.py & | ||
|
||
cat << EOF > /opt/Caddyfile | ||
http://:${PORT} { | ||
route / { | ||
reverse_proxy localhost:8080 | ||
} | ||
route /bot/* { | ||
reverse_proxy localhost:8081 | ||
} | ||
} | ||
EOF | ||
|
||
/opt/caddy run -config /opt/Caddyfile |