-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-services.yml
51 lines (46 loc) · 2.18 KB
/
docker-services.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
version: '2'
services:
base_app:
image: justfixnyc/tenants2_base:0.10
volumes:
# Note that we're storing our Python and Node dependencies
# in separate volumes, outside of the Docker Host's filesystem.
# This is done to ensure that the Linux-based shared libraries
# in these directories won't get mixed up with Darwin or
# other non-Linux native code compiled on the Docker Host.
- python-venv:/venv/
# This is really weird: some OS X systems behave erratically when
# we try overlaying and then populating our own node_modules atop the
# user's repository checkout, so instead we're going to mount an
# *empty* node_modules in that place and use /node_modules (in the
# root of the container) to store all our things.
- unused-node-modules:/tenants2/node_modules/
- node-modules:/node_modules/
- .docker-yarnrc:/.yarnrc
- yarn-cache:/var/yarn-cache/
- pipenv-cache:/var/pipenv-cache/
environment:
# This is used by pipenv, but not really documented anywhere:
# https://github.com/pypa/pipenv/blob/master/pipenv/environments.py#L208
- VIRTUAL_ENV=/venv
- PYTHONUNBUFFERED=yup
- PIPENV_CACHE_DIR=/var/pipenv-cache
# This disables an annoying "Pipenv found itself running within a virtual environment"
# warning.
- PIPENV_VERBOSITY=-1
- DDM_VENV_DIR=/venv
- DDM_USER_OWNED_DIRS=/venv:/node_modules:/var/yarn-cache:/var/pipenv-cache
- DDM_HOST_USER=justfix
- DDM_IS_RUNNING_IN_DOCKER=yup
# This was needed for file watchers to work on Windows, but Docker for Windows has
# since started supporting file events, so it didn't seem to be needed anymore.
# However, in practice it seems that file watchers sometimes stop noticing changes,
# so we're enabling polling for now, just to be more reliable.
- CHOKIDAR_USEPOLLING=1
- BABEL_CACHE_PATH=/tenants2/.babel-cache.json
- DATABASE_URL=postgis://justfix@db/justfix
- WEBPACK_ADDITIONAL_MODULE_DIRS=/node_modules
entrypoint: ["python", "/tenants2/docker_django_management.py"]
working_dir: /tenants2
mem_limit: 2G
memswap_limit: 0