Skip to content

Commit

Permalink
🧱 Add just and caddy support
Browse files Browse the repository at this point in the history
  • Loading branch information
DrgnFireYellow committed Jul 31, 2024
1 parent cd1de5c commit 50c5229
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
rev: v2.2.1
hooks:
- id: autoflake
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
# - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
# rev: v0.1.0
# hooks:
# - id: dockerfilelint
8 changes: 8 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
https://

tls internal {
on_demand
}

root * output
file_server
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM nginx:1.25.3
FROM caddy:alpine
LABEL org.opencontainers.image.source="https://github.com/drgnfireyellow/emuweb"
LABEL maintainer="DrgnFireYellow"
COPY nginx.conf /etc/nginx/nginx.conf
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY ./ /EmuWeb
COPY Caddyfile /etc/caddy/Caddyfile
WORKDIR /EmuWeb
EXPOSE 80
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip && apt clean && rm -rf /var/lib/apt/lists/* && python3 -m pip install -r /EmuWeb/requirements.txt --break-system-packages
EXPOSE 80 443
RUN apk update && apk add python3 py3-pip && apk cache clean && python3 -m pip install -r /EmuWeb/requirements.txt --break-system-packages
ENTRYPOINT ["/bin/sh", "/docker-entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/usr/bin/python3 /EmuWeb/main.py
nginx -c /etc/nginx/nginx.conf -g "daemon off;"
caddy run
17 changes: 17 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
install_ubuntu_amd64:
# Install git and curl
sudo apt-get install git curl
# Download git repo
git clone https://github.com/DrgnFireYellow/EmuWeb.git
# Download and install Caddy
curl -o caddy.deb https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.deb
sudo apt-get install ./caddy.deb

install_ubuntu_arm64:
# Install git and curl
sudo apt-get install git curl
# Download git repo
git clone https://github.com/DrgnFireYellow/EmuWeb.git
# Download and install Caddy
curl -o caddy.deb https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_arm64.deb
sudo apt-get install ./caddy.deb

0 comments on commit 50c5229

Please sign in to comment.