refactor: update Docker workflow and configuration for clarity and consistency

This commit is contained in:
Menno van Leeuwen 2024-11-11 14:41:51 +01:00
parent d264e05d31
commit 19f8c54b57
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE
3 changed files with 8 additions and 8 deletions

View File

@ -4,10 +4,7 @@ on:
release: release:
types: [published] types: [published]
push: push:
branches: [ "main" ]
tags: [ 'v*.*.*' ] tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
env: env:
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}

View File

@ -19,7 +19,7 @@ services:
image: ghcr.io/vleeuwenmenno/auto-upnp:latest image: ghcr.io/vleeuwenmenno/auto-upnp:latest
network_mode: host network_mode: host
environment: environment:
- PORTS=[{"port": 80, "protocol": "tcp"}, {"port": 443, "protocol": "tcp"}] PORTS: [{"port": 80, "protocol": "tcp"}, {"port": 443, "protocol": "tcp"}]
``` ```
### Environment Variables ### Environment Variables

View File

@ -1,14 +1,17 @@
name: auto-upnp name: auto-upnp
services: services:
upnp: upnp:
# image: ghcr.io/vleeuwenmenno/auto-upnp:latest image: ghcr.io/vleeuwenmenno/auto-upnp:latest
build: # build:
context: . # context: .
dockerfile: Dockerfile # dockerfile: Dockerfile
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
environment: environment:
UPNP_DURATION: 86400 # 24 hours in seconds UPNP_DURATION: 86400 # 24 hours in seconds
# One-liner
# PORTS: [{"port": 80, "protocol": "tcp"}, {"port": 443, "protocol": "tcp"}]
# Or multi-line
PORTS: | PORTS: |
[ [
{"port": 7777, "protocol": "udp"}, {"port": 7777, "protocol": "udp"},