feat: dev docker-compose

This commit is contained in:
Nicolas Giard
2018-08-28 00:23:05 -04:00
parent 4cb9f3d9c6
commit 2483dce941
6 changed files with 95 additions and 6 deletions

View File

@@ -1,12 +1,19 @@
FROM requarks/wiki:latest
# -- DEV DOCKERFILE --
# -- DO NOT USE IN PRODUCTION! --
# Replace with your email address:
ENV WIKI_ADMIN_EMAIL admin@example.com
FROM node:8-alpine
LABEL maintainer "requarks.io"
RUN apk update && \
apk add bash curl git python make g++ --no-cache && \
mkdir -p /var/wiki
WORKDIR /var/wiki
COPY package.json .
RUN yarn --silent
# Replace your-config.yml with the path to your config file:
ADD your-config.yml config.yml
ENV dockerdev 1
EXPOSE 3000
ENTRYPOINT [ "node", "server" ]
CMD ["tail", "-f", "/dev/null"]

16
dev/docker/config.yml Normal file
View File

@@ -0,0 +1,16 @@
port: 3000
paths:
content: ./content
data: ./data
db:
type: postgres
host: db
port: 5432
user: wikijs
pass: wikijsrocks
db: wiki
redis:
host: redis
port: 6379
db: 0
logLevel: info

View File

@@ -1,19 +0,0 @@
version: '3'
services:
wikidb:
image: mongo
expose:
- '27017'
command: '--smallfiles --logpath=/dev/null'
volumes:
- ./data/mongo:/data/db
wikijs:
image: 'requarks/wiki:latest'
links:
- wikidb
ports:
- '80:3000'
environment:
WIKI_ADMIN_EMAIL: admin@example.com
volumes:
- ./config.yml:/var/wiki/config.yml