mirror of
https://github.com/Thumbscrew/wikijs-docker-compose.git
synced 2025-01-18 01:25:45 +00:00
add compose file and env example
This commit is contained in:
parent
065e0c4795
commit
01d36a78fc
10
.env.example
Normal file
10
.env.example
Normal file
@ -0,0 +1,10 @@
|
||||
# Docker settings
|
||||
DOCKER_PROXY_NETWORK=proxy
|
||||
DOCKER_PROXY_EXT=true
|
||||
VOLUME_PATH=/data/wikijs
|
||||
|
||||
# Postgres settings
|
||||
POSTGRES_TAG=11-alpine
|
||||
|
||||
# Wiki.js settings
|
||||
WIKI_TAG=2
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
secrets/postgres_password.txt
|
||||
.env
|
44
docker-compose.yaml
Normal file
44
docker-compose.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
secrets:
|
||||
postgres_password:
|
||||
file: ./secrets/postgres_password.txt
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
external: ${DOCKER_PROXY_EXT-true}
|
||||
name: ${DOCKER_PROXY_NETWORK}
|
||||
backend:
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:${POSTGRES_TAG}
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${VOLUME_PATH}/var/lib/postgresql/data:/var/lib/postgresql/data:rw
|
||||
secrets:
|
||||
- postgres_password
|
||||
networks:
|
||||
- backend
|
||||
environment:
|
||||
POSTGRES_DB: wiki
|
||||
POSTGRES_USER: wikijs
|
||||
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
|
||||
|
||||
wiki:
|
||||
image: ghcr.io/requarks/wiki:${WIKI_TAG}
|
||||
secrets:
|
||||
- postgres_password
|
||||
environment:
|
||||
DB_TYPE: postgres
|
||||
DB_HOST: db
|
||||
DB_PORT: 5432
|
||||
DB_USER: wikijs
|
||||
DB_PASS_FILE: /run/secrets/postgres_password
|
||||
DB_NAME: wiki
|
||||
networks:
|
||||
- backend
|
||||
- frontend
|
||||
restart: unless-stopped
|
||||
# ports: # Uncomment to expore port on host
|
||||
# - "80:3000"
|
||||
depends_on:
|
||||
- db
|
Loading…
Reference in New Issue
Block a user