-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.95 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.95 KB
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
version: "3.2"
services:
# Keystone CMS
cms:
container_name: cms
build: ./cms
ports:
- 3010:3010
environment:
NODE_ENV: local
PORT: 3010
MONGO_URL: "mongodb://mongo:27017/mas-docker"
COOKIE_SECRET: ${KEYSTONE_COOKIE_SECRET}
KEYSTONE_ADMIN_EMAIL: ${KEYSTONE_ADMIN_EMAIL}
KEYSTONE_ADMIN_PASSWORD: ${KEYSTONE_ADMIN_PASSWORD}
HOST_NAME: ${HOST_NAME}
CONTENT_PATH: ${CONTENT_PATH}
HOST_PORT: ${HOST_PORT}
STATIC_SITE_PATH: ${STATIC_SITE_PATH}
volumes:
- $PWD/cms:/app
# Ignore node_modules from mounting to avoid binaries compiled on host machine architecture not working on docker machine: https://stackoverflow.com/a/37898591/486434
- /app/node_modules
depends_on:
- mongo
# MongoDB for the CMS
mongo:
container_name: mongo
image: mongo:4.2
volumes:
- ./mongodb-data:/data/db/mongo # - /path/from/host:/path/to/container
command: --quiet # See https://stackoverflow.com/a/54696259/486434
ports:
- 27017:27017
# Use minio to create a mock, local s3 bucket
s3backend:
image: minio/minio:latest
container_name: s3backend
ports:
- 9000:9000
entrypoint: sh
command: -c '/usr/bin/minio server /data'
# Mount a volume from the host machine to persist files
# Note: the $PWD var is a bash thing so this won't work in cmd on Windows
volumes:
- $PWD/s3-mock/data:/data
environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
# Mimick the public facing side of the S3 bucket to serve static pages and assets
s3frontend:
image: nginx
container_name: s3frontend
ports:
- 8000:8000
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
# Mount and serve both the static assets AND the generated HTML in the S3 bucket
- ./s3-mock/data/demo-bucket:/usr/share/nginx/s3-html/
- ./static-assets:/usr/share/nginx/static-html/