-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.develop.yml
115 lines (108 loc) · 3.87 KB
/
docker-compose.develop.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '2'
services:
la-toolkit:
image: livingatlases/la-toolkit:latest
container_name: la-toolkit
restart: always
hostname: la-toolkit
build:
context: .
dockerfile: docker/u20/Dockerfile
ports:
- "20010:2010"
- "20011-20100:20011-20100"
# Internal an external ports should match in the previous range.
# So don't do these kind of redirections:
# - "3011-3100:2011-2100"
depends_on:
- mongo
environment:
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Useful for having logs with local time
TZ: "Europe/Copenhagen"
# db user/pass (should match the same mongo vars LA_USER/LA_PASS)
DATABASE_URL: mongodb://la_toolkit_user:la_toolkit_changeme@mongo:27017/la_toolkit
# Advanced optional URLs (useful to enable https and use a proxy)
# TOOLKIT_SENTRY_DSN: "SOME_DSN"
# TOOLKIT_PUBLIC_URL: "localhost:2010" or "toolkit.example.com"
TOOLKIT_PUBLIC_URL: "localhost:20010"
# TOOLKIT_HTTPS: "false"
# TOOLKIT_TERM_PROXY: "false"
# The volumes should be writeable by your user so maybe you have to set your uid:gid here
# user: "1000:1000"
# or if you are using docker desktop and GNU/Linux via:
# https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing
volumes:
# mkdir -p /data/la-toolkit/config/ /data/la-toolkit/logs/ /data/la-toolkit/ssh/
- /data/la-toolkit/config/:/home/ubuntu/ansible/la-inventories/:rw
- /data/la-toolkit/logs/:/home/ubuntu/ansible/logs/:rw
- /data/la-toolkit/ssh:/home/ubuntu/.ssh/:rw
- /home/ubuntu/.npm-packages
- ./build/web:/home/ubuntu/la-toolkit/assets/:rw
# For 'custom' ala-install
# Take into account that if your change from 'custom' to other ala-install version
# code changes will be git stashed
- /data/la-toolkit/ala-install:/home/ubuntu/ansible/ala-install/:rw
mongo:
image: mongo:4
restart: always
container_name: la-toolkit-mongo
# Uncomment if mongo-express is not enough
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: la_toolkit_mongo_admin
MONGO_INITDB_ROOT_PASSWORD: la_toolkit_changeme
MONGO_INITDB_DATABASE: la_toolkit
LA_USER: la_toolkit_user
LA_PASS: la_toolkit_changeme
volumes:
- ./mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh
- /data/la-toolkit/mongo:/data/db
mongo-db-backup:
image: tiredofit/mongodb-backup
container_name: la-toolkit-mongo-db-backup
restart: always
links:
- mongo
depends_on:
- mongo
environment:
- DB_HOST=mongo
- DB_USER=la_toolkit_mongo_admin
- DB_PASS=la_toolkit_changeme
# Uncomment to debug in the logs the backups
# - DB_DUMP_DEBUG=TRUE
- DB_DUMP_FREQ=1440
# Uncomment to set a time to do the backup or uncomment to inmediate backup
# - DB_DUMP_BEGIN: 0000
- DB_CLEANUP_TIME=8640
- MD5=TRUE
- COMPRESSION=XZ
- TZ=Europe/Copenhagen
volumes:
- /data/la-toolkit/backups:/backups
# Optionally in production (because this will open your db to the outside):
#
mongo-express:
image: mongo-express
container_name: la-toolkit-mongo-express
restart: always
depends_on:
- mongo
ports:
- 9081:8081
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_ADMINUSERNAME: la_toolkit_mongo_admin
ME_CONFIG_MONGODB_ADMINPASSWORD: la_toolkit_changeme
# 'watchtower' upgrade automatically the la-toolkit, whenever there is a new Docker image available,
# but a container restart is also need to get the new image
watchtower:
image: containrrr/watchtower
container_name: la-toolkit-watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Additional watchtower args
# commmand: