From 0c7bc5abe0782825a3999b9102b8cf9fc8e5b57b Mon Sep 17 00:00:00 2001 From: Aleks Rutins Date: Wed, 11 Jun 2025 17:59:32 -0400 Subject: [PATCH] Get some code written --- .forgejo/workflows/publish.yml | 10 ++++++++++ Caddyfile | 4 ++++ Containerfile | 4 ++++ README.md | 15 ++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/publish.yml create mode 100644 Caddyfile create mode 100644 Containerfile diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..0934b14 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,10 @@ +on: [push] + +jobs: + publish: + runs-on: selfhosted + steps: + - uses: actions/checkout@v4 + - run: podman manifest create -a git.farthergate.com/asr/phlexite-runtime:latest + - run: podman build --platform linux/amd64,linux/arm64 --manifest git.farthergate.com/asr/phlexite-runtime:latest . + - run: podman manifest push git.farthergate.com/asr/phlexite-runtime:latest --creds=asr:'${{secrets.PACKAGES_SECRET}}' diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..8fe11ec --- /dev/null +++ b/Caddyfile @@ -0,0 +1,4 @@ +:3000 { + root * /var/www/html + file_server +} diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..a7e37d9 --- /dev/null +++ b/Containerfile @@ -0,0 +1,4 @@ +FROM caddy:alpine +ADD Caddyfile /etc/caddy/Caddyfile + +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"] diff --git a/README.md b/README.md index bd4aeb9..1e02079 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # phlexite-docker -Run your Phlexite sites on Caddy in containers. \ No newline at end of file +Run your Phlexite sites on Caddy in containers. + +Usage: + +```Dockerfile +FROM git.farthergate.com/asr/phlexite AS build + +ADD . /site +RUN bundle && bundle exec ruby build.rb + +FROM git.farthergate.com/asr/phlexite-runtime + +COPY --from=build /site/_build /var/www/html +```