Skip to content

Commit bf8c7c9

Browse files
authored
Merge branch 'jlesage:master' into master
2 parents fcba148 + f131a50 commit bf8c7c9

File tree

24 files changed

+1228
-1105
lines changed

24 files changed

+1228
-1105
lines changed

.drone.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
99
liberapay: # Replace with a single Liberapay username
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
12-
custom: https://paypal.me/JocelynLeSage/0usd
12+
custom: https://paypal.me/JocelynLeSage

.github/workflows/build-image.yml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: Docker image CI/CD
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
env:
8+
DOCKER_IMAGE_NAME: jlesage/nginx-proxy-manager
9+
PLATFORMS: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
10+
11+
on:
12+
push:
13+
branches: '*'
14+
tags:
15+
- v[0-9][0-9].[0-9][0-9].[0-9]+
16+
- v[0-9][0-9].[0-9][0-9].[0-9]+-pre.[0-9]+
17+
pull_request:
18+
19+
jobs:
20+
build:
21+
name: Build image
22+
runs-on: ubuntu-20.04
23+
24+
steps:
25+
- name: Free disk space
26+
run: |
27+
# Free disk space.
28+
echo "::group::Before"
29+
df -h /
30+
echo "::endgroup::"
31+
echo "::group::Removing unneeded softwares and files..."
32+
for DIR in /usr/local/lib/android /usr/share/dotnet /opt/ghc
33+
do
34+
if [ -d "$DIR" ]; then
35+
echo "Removing $DIR..."
36+
sudo rm -r "$DIR"
37+
fi
38+
done
39+
echo "::endgroup::"
40+
echo "::group::After"
41+
df -h /
42+
echo "::endgroup::"
43+
44+
- name: Prepare
45+
id: prep
46+
run: |
47+
# Determine the Docker container version.
48+
VERSION=unknown
49+
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
50+
# Git tag pushed: use tag as the version.
51+
VERSION=${GITHUB_REF#refs/tags/}
52+
elif [[ $GITHUB_REF =~ refs/heads/* ]]; then
53+
# Git commit pushed: use the commit SHA as the version.
54+
VERSION=${GITHUB_SHA::8}
55+
elif [[ $GITHUB_REF =~ refs/pull/* ]]; then
56+
# Pull request: use PR number as the version.
57+
VERSION=pr-${{ github.event.number }}
58+
else
59+
echo "::error::Unexpected GITHUB_REF: $GITHUB_REF"
60+
exit 1
61+
fi
62+
# Determine the version to put in container label.
63+
LABEL_VERSION=${VERSION}
64+
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
65+
# Do not include the starting 'v' of the version.
66+
LABEL_VERSION=${VERSION:1}
67+
fi
68+
# Determine the Docker container tags.
69+
TAGS="${{ env.DOCKER_IMAGE_NAME }}:${VERSION}"
70+
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
71+
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
72+
fi
73+
# Determine the release type.
74+
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
75+
IS_RELEASE=yes
76+
if [[ $GITHUB_REF =~ -pre\.[0-9]+ ]]; then
77+
RELEASE_TYPE="pre"
78+
else
79+
RELEASE_TYPE="standard"
80+
fi
81+
else
82+
IS_RELEASE=no
83+
RELEASE_TYPE="n/a"
84+
fi
85+
# Print results.
86+
echo "::group::Results"
87+
echo "Github reference: $GITHUB_REF"
88+
echo "Release: $IS_RELEASE"
89+
echo "Release type: $RELEASE_TYPE"
90+
echo "Docker container version: $VERSION"
91+
echo "Docker container version label: $LABEL_VERSION"
92+
echo "Docker container tag(s): $TAGS"
93+
echo "::endgroup::"
94+
# Export outputs.
95+
echo "is_release=${IS_RELEASE}" >> $GITHUB_OUTPUT
96+
echo "release_type=${RELEASE_TYPE}" >> $GITHUB_OUTPUT
97+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
98+
echo "label_version=${LABEL_VERSION}" >> $GITHUB_OUTPUT
99+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
100+
#echo "build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
101+
102+
- name: Checkout
103+
uses: actions/checkout@v3
104+
105+
- name: Setup QEMU
106+
uses: docker/setup-qemu-action@v2
107+
with:
108+
platforms: arm,arm64,ppc64le,mips64,s390x
109+
110+
- name: Setup Docker Buildx
111+
uses: docker/setup-buildx-action@v2
112+
113+
- name: Login to DockerHub
114+
if: ${{ steps.prep.outputs.is_release == 'yes' }}
115+
uses: docker/login-action@v2
116+
with:
117+
username: ${{ secrets.DOCKERHUB_USERNAME }}
118+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
119+
120+
- name: Build and push
121+
uses: docker/build-push-action@v4
122+
with:
123+
push: ${{ steps.prep.outputs.is_release == 'yes' }}
124+
provenance: false
125+
platforms: ${{ env.PLATFORMS }}
126+
tags: ${{ steps.prep.outputs.tags }}
127+
build-args: |
128+
DOCKER_IMAGE_VERSION=${{ steps.prep.outputs.label_version }}
129+
cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }}
130+
cache-to: type=gha,mode=max,scope=${{ env.DOCKER_IMAGE_NAME }}
131+
132+
- name: Inspect
133+
if: ${{ steps.prep.outputs.is_release == 'yes' }}
134+
run: |
135+
docker buildx imagetools inspect ${{ env.DOCKER_IMAGE_NAME }}:${{ steps.prep.outputs.version }}
136+
137+
- name: Dockerhub description
138+
if: ${{ steps.prep.outputs.release_type == 'standard' }}
139+
uses: peter-evans/dockerhub-description@v3
140+
with:
141+
username: ${{ secrets.DOCKERHUB_USERNAME }}
142+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
143+
repository: ${{ env.DOCKER_IMAGE_NAME }}
144+
readme-filepath: DOCKERHUB.md
145+
146+
notification:
147+
name: Notification
148+
needs: [ build ]
149+
runs-on: ubuntu-20.04
150+
if: ${{ always() }}
151+
152+
steps:
153+
- name: Pushover notification
154+
uses: desiderati/github-action-pushover@v1
155+
with:
156+
job-status: ${{ needs.build.result }}
157+
pushover-api-token: ${{ secrets.PUSHOVER_API_TOKEN }}
158+
pushover-user-key: ${{ secrets.PUSHOVER_USER_KEY }}

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

DOCKERHUB.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Docker container for Nginx Proxy Manager
2-
[![Docker Image Size](https://img.shields.io/microbadger/image-size/jlesage/nginx-proxy-manager)](http://microbadger.com/#/images/jlesage/nginx-proxy-manager) [![Build Status](https://drone.le-sage.com/api/badges/jlesage/docker-nginx-proxy-manager/status.svg)](https://drone.le-sage.com/jlesage/docker-nginx-proxy-manager) [![GitHub Release](https://img.shields.io/github/release/jlesage/docker-nginx-proxy-manager.svg)](https://github.com/jlesage/docker-nginx-proxy-manager/releases/latest) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/JocelynLeSage/0usd)
2+
[![Docker Image Size](https://img.shields.io/docker/image-size/jlesage/nginx-proxy-manager/latest)](https://hub.docker.com/r/jlesage/nginx-proxy-manager/tags) [![Build Status](https://github.com/jlesage/docker-nginx-proxy-manager/actions/workflows/build-image.yml/badge.svg?branch=master)](https://github.com/jlesage/docker-nginx-proxy-manager/actions/workflows/build-image.yml) [![GitHub Release](https://img.shields.io/github/release/jlesage/docker-nginx-proxy-manager.svg)](https://github.com/jlesage/docker-nginx-proxy-manager/releases/latest) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/JocelynLeSage)
3+
4+
This is a Docker container for [Nginx Proxy Manager](https://nginxproxymanager.com).
5+
36

4-
This is a Docker container for [Nginx Proxy Manager](https://nginxproxymanager.jc21.com).
57

68
---
79

8-
[![Nginx Proxy Manager logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/nginx-proxy-manager-icon.png&w=200)](https://nginxproxymanager.jc21.com)[![Nginx Proxy Manager](https://dummyimage.com/400x110/ffffff/575757&text=Nginx+Proxy+Manager)](https://nginxproxymanager.jc21.com)
10+
[![Nginx Proxy Manager logo](https://images.weserv.nl/?url=raw.githubusercontent.com/jlesage/docker-templates/master/jlesage/images/nginx-proxy-manager-icon.png&w=110)](https://nginxproxymanager.com)[![Nginx Proxy Manager](https://images.placeholders.dev/?width=608&height=110&fontFamily=monospace&fontWeight=400&fontSize=52&text=Nginx%20Proxy%20Manager&bgColor=rgba(0,0,0,0.0)&textColor=rgba(121,121,121,1))](https://nginxproxymanager.com)
911

10-
Nginx Proxy Manager enables you to easily forward to your websites running at home or otherwise, including free SSL, without having to know too much about Nginx or Letsencrypt.
12+
Nginx Proxy Manager enables you to easily forward to your websites running at
13+
home or otherwise, including free SSL, without having to know too much about
14+
Nginx or Letsencrypt.
1115

1216
---
1317

@@ -17,7 +21,7 @@ Nginx Proxy Manager enables you to easily forward to your websites running at ho
1721
and parameters should be adjusted to your need.
1822

1923
Launch the Nginx Proxy Manager docker container with the following command:
20-
```
24+
```shell
2125
docker run -d \
2226
--name=nginx-proxy-manager \
2327
-p 8181:8181 \
@@ -28,7 +32,7 @@ docker run -d \
2832
```
2933

3034
Where:
31-
- `/docker/appdata/nginx-proxy-manager`: This is where the application stores its configuration, log and any files needing persistency.
35+
- `/docker/appdata/nginx-proxy-manager`: This is where the application stores its configuration, states, log and any files needing persistency.
3236

3337
Browse to `http://your-host-ip:8181` to access the Nginx Proxy Manager web interface.
3438

0 commit comments

Comments
 (0)