mirror of https://github.com/requarks/wiki
parent
e4efb38fbd
commit
3c28ac8092
@ -1,43 +0,0 @@
|
||||
# =========================
|
||||
# --- BUILD NPM MODULES ---
|
||||
# =========================
|
||||
FROM node:16-alpine AS build
|
||||
|
||||
RUN apk add yarn g++ make cmake python3 --no-cache
|
||||
|
||||
WORKDIR /wiki
|
||||
|
||||
COPY ./package.json ./package.json
|
||||
|
||||
RUN yarn --production --frozen-lockfile --non-interactive --network-timeout 100000
|
||||
|
||||
# ===============
|
||||
# --- Release ---
|
||||
# ===============
|
||||
FROM node:16-alpine
|
||||
LABEL maintainer="requarks.io"
|
||||
|
||||
RUN apk add bash curl git openssh gnupg sqlite --no-cache && \
|
||||
mkdir -p /wiki && \
|
||||
mkdir -p /logs && \
|
||||
mkdir -p /wiki/data/content && \
|
||||
chown -R node:node /wiki /logs
|
||||
|
||||
WORKDIR /wiki
|
||||
|
||||
COPY --chown=node:node ./build/assets ./assets
|
||||
COPY --chown=node:node --from=build /wiki/node_modules ./node_modules
|
||||
COPY --chown=node:node ./server ./server
|
||||
COPY --chown=node:node ./build/server/views ./server/views
|
||||
COPY --chown=node:node ./dev/build/config.yml ./config.yml
|
||||
COPY --chown=node:node ./build/package.json ./package.json
|
||||
COPY --chown=node:node ./LICENSE ./LICENSE
|
||||
|
||||
USER node
|
||||
|
||||
VOLUME ["/wiki/data/content"]
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 3443
|
||||
|
||||
CMD ["node", "server"]
|
@ -1,18 +0,0 @@
|
||||
# -- DEV DOCKERFILE --
|
||||
# -- DO NOT USE IN PRODUCTION! --
|
||||
|
||||
FROM node:14
|
||||
LABEL maintainer "requarks.io"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y bash curl git python make g++ nano openssh-server gnupg && \
|
||||
mkdir -p /wiki
|
||||
|
||||
WORKDIR /wiki
|
||||
|
||||
ENV dockerdev 1
|
||||
ENV DEVDB postgres
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["tail", "-f", "/dev/null"]
|
@ -1,10 +0,0 @@
|
||||
port: 3000
|
||||
bindIP: 0.0.0.0
|
||||
db:
|
||||
type: postgres
|
||||
host: db
|
||||
port: 5432
|
||||
user: wikijs
|
||||
pass: wikijsrocks
|
||||
db: wiki
|
||||
logLevel: info
|
@ -1,44 +0,0 @@
|
||||
# -- DEV DOCKER-COMPOSE --
|
||||
# -- DO NOT USE IN PRODUCTION! --
|
||||
|
||||
version: "3.8"
|
||||
services:
|
||||
db:
|
||||
image: postgres:11-alpine
|
||||
environment:
|
||||
POSTGRES_DB: wiki
|
||||
POSTGRES_PASSWORD: wikijsrocks
|
||||
POSTGRES_USER: wikijs
|
||||
logging:
|
||||
driver: "none"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4:latest
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: dev@js.wiki
|
||||
PGADMIN_DEFAULT_PASSWORD: "123123"
|
||||
PGADMIN_DISABLE_POSTFIX: true
|
||||
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: False
|
||||
network_mode: service:db
|
||||
logging:
|
||||
driver: "none"
|
||||
|
||||
wiki:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: dev/containers/Dockerfile
|
||||
command: sleep infinity
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ../..:/workspace
|
||||
network_mode: service:db
|
||||
ipc: host
|
||||
init: true
|
||||
|
||||
|
||||
volumes:
|
||||
db-data:
|
@ -1,33 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres:11-alpine
|
||||
environment:
|
||||
POSTGRES_DB: wiki
|
||||
POSTGRES_PASSWORD: wikijsrocks
|
||||
POSTGRES_USER: wikijs
|
||||
logging:
|
||||
driver: "none"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
|
||||
wiki:
|
||||
image: requarks/wiki:2
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
DB_TYPE: postgres
|
||||
DB_HOST: db
|
||||
DB_PORT: 5432
|
||||
DB_USER: wikijs
|
||||
DB_PASS: wikijsrocks
|
||||
DB_NAME: wiki
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:3000"
|
||||
- "443:3443"
|
||||
|
||||
volumes:
|
||||
db-data:
|
@ -1,8 +0,0 @@
|
||||
FROM requarks/wiki:2
|
||||
|
||||
USER root
|
||||
|
||||
RUN chgrp -R 0 /wiki /logs && \
|
||||
chmod -R g=u /wiki /logs
|
||||
|
||||
USER 1001
|
Loading…
Reference in new issue