Skip to content

Commit efc5bff

Browse files
committed
Makes SQLite the default database in documentation
1 parent ffe3db8 commit efc5bff

File tree

2 files changed

+50
-93
lines changed

2 files changed

+50
-93
lines changed

README.md

+1-17
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,12 @@ services:
7474
- '80:80'
7575
- '81:81'
7676
- '443:443'
77-
environment:
78-
DB_MYSQL_HOST: "db"
79-
DB_MYSQL_PORT: 3306
80-
DB_MYSQL_USER: "npm"
81-
DB_MYSQL_PASSWORD: "npm"
82-
DB_MYSQL_NAME: "npm"
8377
volumes:
8478
- ./data:/data
8579
- ./letsencrypt:/etc/letsencrypt
86-
db:
87-
image: 'jc21/mariadb-aria:latest'
88-
restart: unless-stopped
89-
environment:
90-
MYSQL_ROOT_PASSWORD: 'npm'
91-
MYSQL_DATABASE: 'npm'
92-
MYSQL_USER: 'npm'
93-
MYSQL_PASSWORD: 'npm'
94-
volumes:
95-
- ./data/mysql:/var/lib/mysql
9680
```
9781
98-
3. Bring up your stack
82+
3. Bring up your stack by running
9983
10084
```bash
10185
docker-compose up -d

docs/setup/README.md

+49-76
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
# Full Setup Instructions
22

3-
## MySQL Database
3+
## Running the App
4+
5+
Create a `docker-compose.yml` file:
6+
7+
```yml
8+
version: "3"
9+
services:
10+
app:
11+
image: 'jc21/nginx-proxy-manager:latest'
12+
restart: unless-stopped
13+
ports:
14+
# These ports are in format <host-port>:<container-port>
15+
- '80:80' # Public HTTP Port
16+
- '443:443' # Public HTTPS Port
17+
- '81:81' # Admin Web Port
18+
# Add any other Stream port you want to expose
19+
# - '21:21' # FTP
20+
21+
# Uncomment the next line if you uncomment anything in the section
22+
# environment:
23+
# Uncomment this if you want to change the location of
24+
# the SQLite DB file within the container
25+
# DB_SQLITE_FILE: "/data/database.sqlite"
26+
27+
# Uncomment this if IPv6 is not enabled on your host
28+
# DISABLE_IPV6: 'true'
29+
30+
volumes:
31+
- ./data:/data
32+
- ./letsencrypt:/etc/letsencrypt
33+
```
34+
35+
Then:
36+
37+
```bash
38+
docker-compose up -d
39+
```
40+
41+
## Using MySQL / MariaDB Database
442

543
If you opt for the MySQL configuration you will have to provide the database server yourself. You can also use MariaDB. Here are the minimum supported versions:
644

@@ -10,15 +48,7 @@ If you opt for the MySQL configuration you will have to provide the database ser
1048
It's easy to use another docker container for your database also and link it as part of the docker stack, so that's what the following examples
1149
are going to use.
1250

13-
::: warning
14-
15-
When using a `mariadb` database, the NPM configuration file should still use the `mysql` engine!
16-
17-
:::
18-
19-
## Running the App
20-
21-
Via `docker-compose`:
51+
Here is an example of what your `docker-compose.yml` will look like when using a MariaDB container:
2252

2353
```yml
2454
version: "3"
@@ -27,31 +57,26 @@ services:
2757
image: 'jc21/nginx-proxy-manager:latest'
2858
restart: unless-stopped
2959
ports:
30-
# Public HTTP Port:
31-
- '80:80'
32-
# Public HTTPS Port:
33-
- '443:443'
34-
# Admin Web Port:
35-
- '81:81'
60+
# These ports are in format <host-port>:<container-port>
61+
- '80:80' # Public HTTP Port
62+
- '443:443' # Public HTTPS Port
63+
- '81:81' # Admin Web Port
3664
# Add any other Stream port you want to expose
3765
# - '21:21' # FTP
3866
environment:
39-
# These are the settings to access your db
4067
DB_MYSQL_HOST: "db"
4168
DB_MYSQL_PORT: 3306
4269
DB_MYSQL_USER: "npm"
4370
DB_MYSQL_PASSWORD: "npm"
4471
DB_MYSQL_NAME: "npm"
45-
# If you would rather use Sqlite uncomment this
46-
# and remove all DB_MYSQL_* lines above
47-
# DB_SQLITE_FILE: "/data/database.sqlite"
4872
# Uncomment this if IPv6 is not enabled on your host
4973
# DISABLE_IPV6: 'true'
5074
volumes:
5175
- ./data:/data
5276
- ./letsencrypt:/etc/letsencrypt
5377
depends_on:
5478
- db
79+
5580
db:
5681
image: 'jc21/mariadb-aria:latest'
5782
restart: unless-stopped
@@ -64,13 +89,11 @@ services:
6489
- ./data/mysql:/var/lib/mysql
6590
```
6691
67-
_Please note, that `DB_MYSQL_*` environment variables will take precedent over `DB_SQLITE_*` variables. So if you keep the MySQL variables, you will not be able to use Sqlite._
92+
::: warning
6893
69-
Then:
94+
Please note, that `DB_MYSQL_*` environment variables will take precedent over `DB_SQLITE_*` variables. So if you keep the MySQL variables, you will not be able to use SQLite.
7095

71-
```bash
72-
docker-compose up -d
73-
```
96+
:::
7497

7598
## Running on Raspberry PI / ARM devices
7699

@@ -89,57 +112,7 @@ for a list of supported architectures and if you want one that doesn't exist,
89112
Also, if you don't know how to already, follow [this guide to install docker and docker-compose](https://manre-universe.net/how-to-run-docker-and-docker-compose-on-raspbian/)
90113
on Raspbian.
91114

92-
Via `docker-compose`:
93-
94-
```yml
95-
version: "3"
96-
services:
97-
app:
98-
image: 'jc21/nginx-proxy-manager:latest'
99-
restart: unless-stopped
100-
ports:
101-
# Public HTTP Port:
102-
- '80:80'
103-
# Public HTTPS Port:
104-
- '443:443'
105-
# Admin Web Port:
106-
- '81:81'
107-
environment:
108-
# These are the settings to access your db
109-
DB_MYSQL_HOST: "db"
110-
DB_MYSQL_PORT: 3306
111-
DB_MYSQL_USER: "changeuser"
112-
DB_MYSQL_PASSWORD: "changepass"
113-
DB_MYSQL_NAME: "npm"
114-
# If you would rather use Sqlite uncomment this
115-
# and remove all DB_MYSQL_* lines above
116-
# DB_SQLITE_FILE: "/data/database.sqlite"
117-
# Uncomment this if IPv6 is not enabled on your host
118-
# DISABLE_IPV6: 'true'
119-
volumes:
120-
- ./data/nginx-proxy-manager:/data
121-
- ./letsencrypt:/etc/letsencrypt
122-
depends_on:
123-
- db
124-
db:
125-
image: yobasystems/alpine-mariadb:latest
126-
restart: unless-stopped
127-
environment:
128-
MYSQL_ROOT_PASSWORD: "changeme"
129-
MYSQL_DATABASE: "npm"
130-
MYSQL_USER: "changeuser"
131-
MYSQL_PASSWORD: "changepass"
132-
volumes:
133-
- ./data/mariadb:/var/lib/mysql
134-
```
135-
136-
_Please note, that `DB_MYSQL_*` environment variables will take precedent over `DB_SQLITE_*` var>
137-
138-
Then:
139-
140-
```bash
141-
docker-compose up -d
142-
```
115+
Please note that the `jc21/mariadb-aria:latest` image might have some problems on some ARM devices, if you want a separate database container, use the `yobasystems/alpine-mariadb:latest` image.
143116

144117
## Initial Run
145118

0 commit comments

Comments
 (0)