Skip to content

Commit 0f70531

Browse files
committed
Support Sqlite
1 parent bf036cb commit 0f70531

19 files changed

+9430
-132
lines changed

Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
1-
FROM jc21/nginx-proxy-manager-base:latest
1+
FROM jc21/nginx-proxy-manager:latest as build
2+
3+
RUN cd /app \
4+
&& npm install sqlite3
5+
6+
FROM jc21/nginx-proxy-manager:latest as production
27

38
MAINTAINER Jamie Curnow <[email protected]>
49
LABEL maintainer="Jamie Curnow <[email protected]>"
510

6-
ENV SUPPRESS_NO_CONFIG_WARNING=1
7-
ENV S6_FIX_ATTRS_HIDDEN=1
8-
RUN echo "fs.file-max = 65535" > /etc/sysctl.conf
9-
10-
# Nginx, Node and required packages should already be installed from the base image
11+
# App
12+
ENV NODE_ENV=production
1113

12-
# root filesystem
13-
COPY rootfs /
1414

15-
# s6 overlay
16-
RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.21.4.0/s6-overlay-amd64.tar.gz" \
17-
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C /
15+
ADD src/backend/ /app/src/backend/
1816

19-
# App
20-
ENV NODE_ENV=production
17+
COPY --from=build /app/node_modules/sqlite3 /app/node_modules/sqlite3
18+
COPY --from=build /app/node_modules/nopt /app/node_modules/nopt
19+
COPY --from=build /app/node_modules/nan /app/node_modules/nan
2120

22-
ADD dist /app/dist
23-
ADD node_modules /app/node_modules
24-
ADD src/backend /app/src/backend
25-
ADD package.json /app/package.json
26-
ADD knexfile.js /app/knexfile.js
2721

2822
# Volumes
2923
VOLUME [ "/data", "/etc/letsencrypt" ]

config/default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"database": {
3-
"engine": "mysql",
3+
"engine": "sqlite",
44
"host": "db",
55
"name": "npm",
66
"user": "npm",

docker-compose.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# WARNING: This is a DEVELOPMENT docker-compose file, it should not be used for production.
2-
version: "2"
1+
version: "3.7"
32
services:
4-
app:
5-
image: jc21/nginx-proxy-manager-base:latest
3+
nginx:
4+
image: ramosisw/nginx-proxy-manager:latest
5+
container_name: nginx
6+
hostname: nginx
7+
build:
8+
context: .
9+
restart: always
10+
networks:
11+
# dns:
12+
nginx:
13+
ipv4_address: 192.168.80.2
614
ports:
715
- 80:80
8-
- 81:81
9-
- 43:443
10-
environment:
11-
- NODE_ENV=development
12-
- FORCE_COLOR=1
16+
# - 81:81
17+
- 443:443
1318
volumes:
14-
- ./data:/data
19+
- ./data/config.json:/app/config/production.json
20+
- ./data/data:/data
21+
- ./data/db:/db
1522
- ./data/letsencrypt:/etc/letsencrypt
16-
- .:/app
17-
- ./rootfs/etc/nginx:/etc/nginx
18-
working_dir: /app
19-
depends_on:
20-
- db
21-
links:
22-
- db
23-
command: node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js
24-
db:
25-
image: jc21/mariadb-aria
2623
environment:
27-
MYSQL_ROOT_PASSWORD: "npm"
28-
MYSQL_DATABASE: "npm"
29-
MYSQL_USER: "npm"
30-
MYSQL_PASSWORD: "npm"
31-
volumes:
32-
- ./config/my.cnf:/etc/mysql/conf.d/npm.cnf
33-
- ./data/mysql:/var/lib/mysql
24+
- FORCE_COLOR=1
25+
networks:
26+
# dns:
27+
# external: true
28+
nginx:
29+
name: nginx
30+
driver: bridge
31+
ipam:
32+
config:
33+
- subnet: 192.168.80.0/28

0 commit comments

Comments
 (0)