Skip to content

Commit c153a01

Browse files
committed
Merge 'feat/use-certapi' into master
2 parents 3e173a2 + f1bb03a commit c153a01

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

.github/workflows/docker-image.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,46 @@ on:
44
push:
55
tags:
66
- '*'
7+
branches:
8+
- master
79

810
jobs:
911
docker:
1012
runs-on: ubuntu-latest
1113
steps:
12-
-
13-
name: Checkout
14+
- name: Checkout
1415
uses: actions/checkout@v3
15-
-
16-
name: Set up QEMU
16+
17+
- name: Set up QEMU
1718
uses: docker/setup-qemu-action@v2
18-
-
19-
name: Set up Docker Buildx
19+
20+
- name: Set up Docker Buildx
2021
uses: docker/setup-buildx-action@v2
21-
-
22-
name: Login to DockerHub
22+
23+
- name: Login to DockerHub
2324
uses: docker/login-action@v2
2425
with:
2526
username: mesudip
2627
password: ${{ secrets.DOCKERHUB_TOKEN }}
2728

28-
-
29-
name: Build and push
29+
- name: Build and push for tags
30+
if: startsWith(github.ref, 'refs/tags/')
3031
uses: docker/build-push-action@v3
3132
with:
3233
file: Dockerfile
3334
context: .
34-
platforms: linux/amd64, linux/arm64
35+
platforms: linux/amd64,linux/arm64
3536
push: true
3637
tags: |
3738
mesudip/nginx-proxy:${{ github.ref_name }}
3839
mesudip/nginx-proxy:latest
40+
41+
- name: Build and push for main branch
42+
if: github.ref == 'refs/heads/master'
43+
uses: docker/build-push-action@v3
44+
with:
45+
file: Dockerfile
46+
context: .
47+
platforms: linux/amd64,linux/arm64
48+
push: true
49+
tags: mesudip/nginx-proxy:${{ github.sha }}

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
venv/
2+
.venv/
3+
24
__pycache__/
35
/.idea/
46
/.run_data/
5-
/run_data
6-
.env
7-
.venv
7+
run_data/
8+
.env

main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def eventLoop():
7373
process_network_event(eventAction, event)
7474
elif eventType == "container":
7575
if eventAction == "health_status":
76-
break
77-
#process_container_health_event(event)
76+
# process_container_health_event(event)
77+
continue
7878
else:
7979
process_container_event(eventAction, event)
8080

@@ -119,7 +119,8 @@ def process_network_event(action, event):
119119
try:
120120
server = WebServer(client)
121121
eventLoop()
122-
except (KeyboardInterrupt, SystemExit):
122+
except (KeyboardInterrupt, SystemExit) as e:
123+
# traceback.print_exception(e)
123124
print("-------------------------------\nPerforming Graceful ShutDown !!")
124125
if server is not None:
125126
server.cleanup()

run_local.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77
#
88

99
mkdir -p ./.run_data/conf.d
10-
#
11-
DUMMY_NGINX=y CHALLENGE_DIR=./.run_data/acme_challenges SSL_DIR=./.run_data NGINX_CONF_DIR=./.run_data python3 main.py
10+
11+
LETSENCRYPT_API=https://acme-staging-v02.api.letsencrypt.org/directory \
12+
CHALLENGE_DIR=./.run_data/acme_challenges \
13+
DUMMY_NGINX=y SSL_DIR=./.run_data NGINX_CONF_DIR=./.run_data python3 main.py

0 commit comments

Comments
 (0)