mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 13:23:02 +01:00
add nodebb
This commit is contained in:
@@ -14,7 +14,6 @@ dockerfiles
|
|||||||
- [ ] gitolite
|
- [ ] gitolite
|
||||||
- [ ] hashcat
|
- [ ] hashcat
|
||||||
- [ ] irc
|
- [ ] irc
|
||||||
- [ ] nodebb
|
|
||||||
- [ ] tshark
|
- [ ] tshark
|
||||||
|
|
||||||
## DONE
|
## DONE
|
||||||
@@ -53,6 +52,7 @@ dockerfiles
|
|||||||
- [x] nginad
|
- [x] nginad
|
||||||
- [x] nginx
|
- [x] nginx
|
||||||
- [x] ngrok :+1:
|
- [x] ngrok :+1:
|
||||||
|
- [x] nodebb
|
||||||
- [x] node-red :+1:
|
- [x] node-red :+1:
|
||||||
- [x] node-red-arm :+1:
|
- [x] node-red-arm :+1:
|
||||||
- [x] obfsproxy
|
- [x] obfsproxy
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Dockerfile for ghost-arm
|
# Dockerfile for ghost-arm
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM vimagick/alpine-arm:edge
|
FROM vimagick/alpine-arm
|
||||||
MAINTAINER kev <noreply@datageek.info>
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
ENV GHOST_VER 0.7.5
|
ENV GHOST_VER 0.7.5
|
||||||
|
|||||||
40
nodebb/Dockerfile
Normal file
40
nodebb/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for nodebb
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
ENV BB_VER 0.9.3
|
||||||
|
ENV BB_URL https://github.com/NodeBB/NodeBB/archive/v$BB_VER.tar.gz
|
||||||
|
ENV BB_SOURCE /usr/src/nodebb
|
||||||
|
ENV BB_CONTENT /var/lib/nodebb
|
||||||
|
|
||||||
|
WORKDIR $BB_SOURCE
|
||||||
|
VOLUME $BB_CONTENT
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apk add -U bash \
|
||||||
|
imagemagick \
|
||||||
|
nodejs \
|
||||||
|
openssl \
|
||||||
|
&& apk add -t TMP build-base \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
openssl-dev \
|
||||||
|
python \
|
||||||
|
tar \
|
||||||
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
||||||
|
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
||||||
|
&& npm install --production \
|
||||||
|
&& npm cache clean \
|
||||||
|
&& apk del TMP \
|
||||||
|
&& rm -rf /tmp/npm* \
|
||||||
|
/var/cache/apk/*
|
||||||
|
|
||||||
|
COPY config.example.json $BB_SOURCE
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
EXPOSE 4567
|
||||||
|
CMD ["npm", "start"]
|
||||||
33
nodebb/README.md
Normal file
33
nodebb/README.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
nodebb
|
||||||
|
======
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[NodeBB][1] Forum Software is powered by Node.js and built on either a Redis or MongoDB database.
|
||||||
|
|
||||||
|
## docker-compose.yml
|
||||||
|
|
||||||
|
```
|
||||||
|
nodebb:
|
||||||
|
image: vimagick/nodebb
|
||||||
|
ports:
|
||||||
|
- "4567:4567"
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:6379:6379"
|
||||||
|
restart: always
|
||||||
|
```
|
||||||
|
|
||||||
|
## up and running
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-compose up -d
|
||||||
|
$ firefox http://localhost:4567
|
||||||
|
```
|
||||||
|
|
||||||
|
[1]: https://nodebb.org/
|
||||||
40
nodebb/arm/Dockerfile
Normal file
40
nodebb/arm/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for nodebb-arm
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM vimagick/alpine-arm
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
ENV BB_VER 0.9.3
|
||||||
|
ENV BB_URL https://github.com/NodeBB/NodeBB/archive/v$BB_VER.tar.gz
|
||||||
|
ENV BB_SOURCE /usr/src/nodebb
|
||||||
|
ENV BB_CONTENT /var/lib/nodebb
|
||||||
|
|
||||||
|
WORKDIR $BB_SOURCE
|
||||||
|
VOLUME $BB_CONTENT
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apk add -U bash \
|
||||||
|
imagemagick \
|
||||||
|
nodejs \
|
||||||
|
openssl \
|
||||||
|
&& apk add -t TMP build-base \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
openssl-dev \
|
||||||
|
python \
|
||||||
|
tar \
|
||||||
|
&& curl -sSL $BB_URL | tar xz --strip 1 \
|
||||||
|
&& sed -i '/"bufferutil": {/,/},/d; /"utf-8-validate": {/,/},/d' npm-shrinkwrap.json \
|
||||||
|
&& npm install --production \
|
||||||
|
&& npm cache clean \
|
||||||
|
&& apk del TMP \
|
||||||
|
&& rm -rf /tmp/npm* \
|
||||||
|
/var/cache/apk/*
|
||||||
|
|
||||||
|
COPY config.example.json $BB_SOURCE
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
EXPOSE 4567
|
||||||
|
CMD ["npm", "start"]
|
||||||
11
nodebb/arm/config.example.json
Normal file
11
nodebb/arm/config.example.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"url": "http://localhost:4567",
|
||||||
|
"secret": "SECRET",
|
||||||
|
"database": "redis",
|
||||||
|
"redis": {
|
||||||
|
"host": "redis",
|
||||||
|
"port": "6379",
|
||||||
|
"password": "",
|
||||||
|
"database": "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
nodebb/arm/docker-compose.yml
Normal file
13
nodebb/arm/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
nodebb:
|
||||||
|
image: vimagick/nodebb-arm
|
||||||
|
ports:
|
||||||
|
- "4567:4567"
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:6379:6379"
|
||||||
|
restart: always
|
||||||
20
nodebb/arm/docker-entrypoint.sh
Executable file
20
nodebb/arm/docker-entrypoint.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export NODE_ENV=production
|
||||||
|
export silent=false
|
||||||
|
export daemon=false
|
||||||
|
|
||||||
|
if [[ "$*" == npm*start* ]]; then
|
||||||
|
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
||||||
|
sed "s/SECRET/$(node -e 'console.log(require("node-uuid").v4())')/" \
|
||||||
|
"$BB_SOURCE/config.example.json" > "$BB_CONTENT/config.json"
|
||||||
|
npm install connect-redis
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
11
nodebb/config.example.json
Normal file
11
nodebb/config.example.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"url": "http://localhost:4567",
|
||||||
|
"secret": "SECRET",
|
||||||
|
"database": "redis",
|
||||||
|
"redis": {
|
||||||
|
"host": "redis",
|
||||||
|
"port": "6379",
|
||||||
|
"password": "",
|
||||||
|
"database": "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
13
nodebb/docker-compose.yml
Normal file
13
nodebb/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
nodebb:
|
||||||
|
image: vimagick/nodebb
|
||||||
|
ports:
|
||||||
|
- "4567:4567"
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:6379:6379"
|
||||||
|
restart: always
|
||||||
20
nodebb/docker-entrypoint.sh
Executable file
20
nodebb/docker-entrypoint.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export NODE_ENV=production
|
||||||
|
export silent=false
|
||||||
|
export daemon=false
|
||||||
|
|
||||||
|
if [[ "$*" == npm*start* ]]; then
|
||||||
|
if [ ! -e "$BB_CONTENT/config.json" ]; then
|
||||||
|
sed "s/SECRET/$(node -e 'console.log(require("node-uuid").v4())')/" \
|
||||||
|
"$BB_SOURCE/config.example.json" > "$BB_CONTENT/config.json"
|
||||||
|
npm install connect-redis
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -sf "$BB_CONTENT/config.json" "$BB_SOURCE/config.json"
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
Reference in New Issue
Block a user