Skip to content

Commit 2d8b5b8

Browse files
author
Jamie Curnow
committed
Updated docs, new docker tags
1 parent a8dd554 commit 2d8b5b8

File tree

6 files changed

+107
-26
lines changed

6 files changed

+107
-26
lines changed

Jenkinsfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pipeline {
99
BASE_IMAGE_NAME = "jc21/nginx-proxy-manager-base"
1010
TEMP_IMAGE_NAME = "nginx-proxy-manager-build_${BUILD_NUMBER}"
1111
TEMP_IMAGE_NAME_ARM = "nginx-proxy-manager-arm-build_${BUILD_NUMBER}"
12-
//TAG_VERSION = getPackageVersion()
13-
TAG_VERSION = "preview"
12+
TAG_VERSION = getPackageVersion()
13+
MAJOR_VERSION = "2"
1414
}
1515
stages {
1616
stage('Prepare') {
@@ -36,13 +36,17 @@ pipeline {
3636
// Private Registry
3737
sh 'docker tag $TEMP_IMAGE_NAME $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION'
3838
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION'
39+
sh 'docker tag $TEMP_IMAGE_NAME $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION'
40+
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION'
3941

4042
// Dockerhub
4143
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
44+
sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION'
4245

4346
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
4447
sh "docker login -u '${duser}' -p '$dpass'"
4548
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION'
49+
sh 'docker push docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION'
4650
}
4751

4852
sh 'docker rmi $TEMP_IMAGE_NAME'
@@ -67,13 +71,17 @@ pipeline {
6771
// Private Registry
6872
sh 'docker tag $TEMP_IMAGE_NAME_ARM $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION-armhf'
6973
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$TAG_VERSION-armhf'
74+
sh 'docker tag $TEMP_IMAGE_NAME_ARM $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION-armhf'
75+
sh 'docker push $DOCKER_PRIVATE_REGISTRY/$IMAGE_NAME:$MAJOR_VERSION-armhf'
7076

7177
// Dockerhub
7278
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
79+
sh 'docker tag $TEMP_IMAGE_NAME_ARM docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION-armhf'
7380

7481
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
7582
sh "docker login -u '${duser}' -p '$dpass'"
7683
sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION-armhf'
84+
sh 'docker push docker.io/jc21/$IMAGE_NAME:$MAJOR_VERSION-armhf'
7785
}
7886

7987
sh 'docker rmi $TEMP_IMAGE_NAME_ARM'

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ running at home or otherwise, including free SSL, without having to know too muc
1212
----------
1313

1414
**WARNING: Version 2 a complete rewrite!** If you are using the `latest` docker tag and update to version 2
15-
without preparation, horrible things might happen. Refer to the [Migrating Documentation](doc/MIGRATING.md).
15+
without preparation, horrible things might happen. Refer to the [Importing Documentation](doc/IMPORTING.md).
1616

1717
----------
1818

@@ -22,7 +22,7 @@ without preparation, horrible things might happen. Refer to the [Migrating Docum
2222
- Easily create forwarding domains, redirections, streams and 404 hosts without knowing anything about Nginx
2323
- Free SSL using Let's Encrypt or provide your own custom SSL certificates
2424
- Access Lists and basic HTTP Authentication for your hosts
25-
- -Advanced Nginx configuration available for super users- TODO
25+
- Advanced Nginx configuration available for super users
2626
- User management, permissions and audit log
2727

2828

@@ -41,9 +41,22 @@ Please consult the [installation instructions](doc/INSTALL.md) for a complete gu
4141
if you just want to get up and running in the quickest time possible, grab all the files in the `doc/example/` folder and run `docker-compose up -d`
4242

4343

44-
## Migrating from Version 1?
44+
## Importing from Version 1?
4545

46-
Here's a [guide for you to migrate your configuration](doc/MIGRATING.md).
46+
Here's a [guide for you to migrate your configuration](doc/IMPORTING.md). You should definitely read the [installation instructions](doc/INSTALL.md) first though.
47+
48+
**Why should I?**
49+
50+
Version 2 has the following improvements:
51+
52+
- Management security and multiple user access
53+
- User permissions and visibility
54+
- Custom SSL certificate support
55+
- Audit log of changes
56+
- Broken nginx config detection
57+
- Multiple domains in Let's Encrypt certificates
58+
- Wildcard domain name support (not available with a Let's Encrypt certificate though)
59+
- It's super sexy
4760

4861

4962
## Administration

doc/IMPORTING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Importing from Version 1
2+
3+
Thanks for using Nginx Proxy Manager version 1. It sucked.
4+
5+
But it worked.
6+
7+
This guide will let your import your configuration from version 1 to version 2.
8+
9+
**IMPORTANT: This will make changes to your `letsencrypt` folder and certificate files!** Make sure you back them up first.
10+
11+
12+
### Link your previous folders in your new docker stack
13+
14+
In version 1, the docker configuration asked for a `config` folder to be linked and a `letsencrypt` folder. However in version 2, the
15+
configuration exists in the database, so the `config` folder is no longer required. However if you have this folder linked in a
16+
version 2 stack, the application will automatically import that configuration the first time it finds it.
17+
18+
Following the [example configuration](../example):
19+
20+
```yaml
21+
version: "3"
22+
services:
23+
app:
24+
image: jc21/nginx-proxy-manager:2
25+
restart: always
26+
ports:
27+
- 80:80
28+
- 81:81
29+
- 443:443
30+
volumes:
31+
- ./config.json:/app/config/production.json
32+
- ./data:/data
33+
- ./letsencrypt:/etc/letsencrypt # this is your previous letsencrypt folder
34+
- ./config:/config # this is your previous config folder
35+
depends_on:
36+
- db
37+
db:
38+
image: mariadb
39+
restart: always
40+
environment:
41+
MYSQL_ROOT_PASSWORD: "password123"
42+
MYSQL_DATABASE: "nginxproxymanager"
43+
MYSQL_USER: "nginxproxymanager"
44+
MYSQL_PASSWORD: "password123"
45+
volumes:
46+
- ./data/mysql:/var/lib/mysql
47+
```
48+
49+
After you start the stack, the import will begin just after database initialize.
50+
51+
Some notes:
52+
- After importing, a file is created in the `config` folder to signify that it has been imported and should not be imported again.
53+
- Because no users previously existed in the version 1 config, the `[email protected]` user will own all of the imported data.
54+
- If you were crazy like me and used Nginx Proxy Manager version 1 to proxy the Admin interface behind a Access List, you should
55+
really disable the access list for that proxy host in version 1 before importing in to version 2. The app doesn't like being behind basic
56+
authentication and it's own internal authentication. If you forgot to do this before importing, just hit the admin interface directly
57+
on port 81 to get around your basic authentication access list.

doc/INSTALL.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
There's a few ways to configure this app depending on:
44

55
- Whether you use `docker-compose` or vanilla docker
6-
- Which architecture you're running it on (raspberry pi also supported)
6+
- Which architecture you're running it on (raspberry pi also supported - Testers wanted!)
77

88
### Configuration File
99

@@ -36,7 +36,7 @@ affect the login and session management of the application. If these keys change
3636

3737
### Database
3838

39-
This app doesn't come with a database, you have to provide one yourself. Currently `mysql` and `postgres` databases are supported.
39+
This app doesn't come with a database, you have to provide one yourself. Currently only `mysql/mariadb` is supported.
4040

4141
It's easy to use another docker container for your database also and link it as part of the docker stack. Here's an example:
4242

@@ -46,7 +46,10 @@ services:
4646
app:
4747
image: jc21/nginx-proxy-manager:2
4848
restart: always
49-
network_mode: host
49+
ports:
50+
- 80:80
51+
- 81:81
52+
- 443:443
5053
volumes:
5154
- ./config.json:/app/config/production.json
5255
- ./data:/data
@@ -76,7 +79,10 @@ services:
7679
app:
7780
image: jc21/nginx-proxy-manager:2
7881
restart: always
79-
network_mode: host
82+
ports:
83+
- 80:80
84+
- 81:81
85+
- 443:443
8086
volumes:
8187
- ./config.json:/app/config/production.json
8288
- ./data:/data
@@ -88,7 +94,9 @@ Vanilla Docker:
8894
```bash
8995
docker run -d \
9096
--name nginx-proxy-manager \
91-
--network host \
97+
-p 80:80 \
98+
-p 81:81 \
99+
-p 443:443 \
92100
-v /path/to/config.json:/app/config/production.json \
93101
-v /path/to/data:/data \
94102
-v /path/to/letsencrypt:/etc/letsencrypt \
@@ -102,20 +110,11 @@ I have created a `armhf` docker container just for you. There may be issues with
102110
if you have issues please report them here.
103111

104112
```bash
105-
# Postgres:
106-
docker run -d \
107-
--name nginx-proxy-manager-db \
108-
--network host \
109-
-e POSTGRES_DB=nginxproxymanager \
110-
-e POSTGRES_USER=nginxproxymanager \
111-
-e POSTGRES_PASSWORD=password123 \
112-
-v /path/to/postgresql:/var/lib/postgresql/data \
113-
zsoltm/postgresql-armhf
114-
115-
# NPM:
116113
docker run -d \
117114
--name nginx-proxy-manager-app \
118-
--network host \
115+
-p 80:80 \
116+
-p 81:81 \
117+
-p 443:443 \
119118
-v /path/to/config.json:/app/config/production.json \
120119
-v /path/to/data:/data \
121120
-v /path/to/letsencrypt:/etc/letsencrypt \

doc/MIGRATING.md

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

doc/example/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ services:
33
app:
44
image: jc21/nginx-proxy-manager:2
55
restart: always
6+
ports:
7+
- 80:80
8+
- 81:81
9+
- 443:443
610
volumes:
711
- ./config.json:/app/config/production.json
812
- ./data:/data
913
- ./letsencrypt:/etc/letsencrypt
1014
depends_on:
1115
- db
16+
environment:
17+
# if you want pretty colors in your docker logs:
18+
- FORCE_COLOR=1
1219
db:
1320
image: mariadb
1421
restart: always

0 commit comments

Comments
 (0)