Skip to content

Commit

Permalink
Run in container with TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Dec 3, 2023
1 parent 79404e7 commit 3f9bf80
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/container-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: Container Run
on:
workflow_dispatch:

defaults:
run:
shell: bash -l -o errexit -o pipefail -o xtrace {0}

jobs:

Expand All @@ -16,10 +19,20 @@ jobs:

- name: Run container
run: |
uname -m
curl 'https://github.com/FiloSottile/mkcert/releases/download/v1.4.4/mkcert-v1.4.4-linux-amd64' \
--output '/usr/local/bin/mkcert'
chmod +x '/usr/local/bin/mkcert'
mkcert -install
mkcert -cert-file '/tmp/cert.pem' -key-file '/tmp/key.pem' localhost
docker run \
--name httpbun \
--detach \
--publish 80:80 \
--publish 443:443 \
--volume /tmp:/tmp:ro \
--env HTTPBUN_TLS_CERT=/tmp/cert.pem \
--env HTTPBUN_TLS_KEY=/tmp/key.pem \
--pull always \
sharat87/httpbun
sleep 1
Expand All @@ -28,4 +41,6 @@ jobs:
set -o errexit
set -o xtrace
curl --silent --show-error --fail --location localhost/get
curl --verbose --silent --show-error --fail --location https://localhost/get
docker logs httpbun

0 comments on commit 3f9bf80

Please sign in to comment.