-
Notifications
You must be signed in to change notification settings - Fork 197
/
docker-compose.yml
67 lines (63 loc) · 2.43 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Allows us to start the stack without touching too much of our local system
#
# note: the application initialization will download/unpack/configure files
# in the local directory...
#
# ##### Usage:
# *0. Create a broken symlink: `ln -sf "/.npm-packages/node_modules/" node_modules`
# 1. Start the database: `docker-compose up -d mongo`
# 2. Start the application: `docker-compose run formio`
# [3]. Stop the database: `docker-compose down` (add --volumes to clear data)
# [4]. Remove lingering docker images: `docker-compose down -v --rmi all`
#
# *TODO: Step 0 is for the bcrypt binary compiled on alpine, which is required...
# but this step feels like an anti-pattern and a better approach should be found
version: '3.7'
services:
forms-flow-forms-db:
container_name: forms-flow-forms-db
image: mongo:5.0
restart: always
hostname: forms-flow-forms-db
ports:
- '27018:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: ${FORMIO_DB_USERNAME:-admin}
MONGO_INITDB_ROOT_PASSWORD: ${FORMIO_DB_PASSWORD:-changeme}
MONGO_INITDB_DATABASE: ${FORMIO_DB_NAME:-formio}
volumes:
- ./mongo_entrypoint/001_user.js:/docker-entrypoint-initdb.d/001_user.js:ro
- ./mongodb/data/db/:/data/db/
- ./mongodb/data/log/:/var/log/mongodb/
- ./mongodb/mongod.conf:/etc/mongod.conf
networks:
- forms-flow-forms-network
forms-flow-forms:
container_name: forms-flow-forms
image: formsflow/forms-flow-forms:v7.0.0-alpha
# The app will restart until Mongo is listening
restart: always
links:
- forms-flow-forms-db
ports:
- '3001:3001'
# The application wants to download things to the local directory
environment:
DEBUG: formio:*
NODE_CONFIG: "{\"mongo\":\"mongodb://${FORMIO_DB_USERNAME:-admin}:${FORMIO_DB_PASSWORD:-changeme}@forms-flow-forms-db:27017/${FORMIO_DB_NAME:-formio}?authSource=admin\"}"
ROOT_EMAIL: ${FORMIO_ROOT_EMAIL:[email protected]}
ROOT_PASSWORD: ${FORMIO_ROOT_PASSWORD:-changeme}
FORMIO_DOMAIN: ${FORMIO_DEFAULT_PROJECT_URL}
FORMIO_JWT_SECRET: ${FORMIO_JWT_SECRET:---- change me now ---}
FORMIO_JWT_EXPIRE: ${FORMIO_JWT_EXPIRE:-240}
NO_INSTALL: ${NO_INSTALL:-1}
MULTI_TENANCY_ENABLED: ${MULTI_TENANCY_ENABLED:-false}
stdin_open: true # -i
tty: true # -t
networks:
- forms-flow-forms-network
networks:
forms-flow-forms-network:
driver: 'bridge'
volumes:
mdb-data: