Add docker-compose
All checks were successful
Build & publish images / build-and-push-image (push) Successful in 24s
All checks were successful
Build & publish images / build-and-push-image (push) Successful in 24s
This commit is contained in:
parent
b8b71481c6
commit
7adfc6aa1d
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
image: mongo
|
||||
volumes:
|
||||
- ./data/db:/data/db
|
||||
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
- env.sample
|
||||
|
||||
keyserver:
|
||||
image: git.plantroon.com/aux/keyserver:master
|
||||
ports:
|
||||
- "12345:3000"
|
||||
depends_on:
|
||||
- mongodb
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
- env.sample
|
||||
|
||||
networks:
|
||||
backend:
|
30
env.sample
Normal file
30
env.sample
Normal file
@ -0,0 +1,30 @@
|
||||
NODE_ENV=production
|
||||
LOG_LEVEL=debug
|
||||
PORT=3000
|
||||
PAPERTRAIL_HOST=''
|
||||
PAPERTRAIL_PORT=''
|
||||
|
||||
MONGO_URI=mongodb:27017/keyserver_db
|
||||
MONGO_USER=keyserver
|
||||
MONGO_PASS=changeme
|
||||
MONGO_INITDB_ROOT_USERNAME=keyserver
|
||||
MONGO_INITDB_ROOT_PASSWORD=changeme
|
||||
MONGO_INITDB_DATABASE=keyserver_db
|
||||
|
||||
SENDER_NAME=keyserver
|
||||
SENDER_EMAIL=changeme
|
||||
|
||||
SMTP_HOST=changeme
|
||||
SMTP_PORT=587
|
||||
SMTP_TLS=false
|
||||
|
||||
SMTP_STARTTLS=true
|
||||
SMTP_PGP=''
|
||||
SMTP_USER=''
|
||||
SMTP_PASS=''
|
||||
|
||||
HTTPS_UPGRADE=true
|
||||
HTTPS_KEY_PIN=''
|
||||
HTTPS_KEY_PIN_BACKUP=''
|
||||
|
||||
PUBLIC_KEY_PURGE_TIME=30
|
12
mongo-init.js
Normal file
12
mongo-init.js
Normal file
@ -0,0 +1,12 @@
|
||||
db.createUser(
|
||||
{
|
||||
user: process.env.MONGO_INITDB_ROOT_USERNAME,
|
||||
pwd: process.env.MONGO_INITDB_ROOT_PASSWORD,
|
||||
roles: [
|
||||
{
|
||||
role: "readWrite",
|
||||
db: process.env.MONGO_INITDB_DATABASE
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue
Block a user