forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
112 lines (105 loc) · 3.17 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
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
version: '3.4'
services:
# Run browser-sync and compile static assets.
#
# This is the primary server and it proxies
# the Django app so that it can add the fancy
# browser refresh JS.
assets:
build:
context: .
target: assets
image: mozorg/bedrock_assets:${GIT_COMMIT:-latest}
command: gulp
ports:
- "8000-8010:8000-8010"
volumes:
- ./media/:/app/media:delegated
- ./bedrock/:/app/bedrock:delegated
environment:
BS_PROXY_URL: "app:8080"
BS_OPEN_BROWSER: "false"
# the django app
app:
build:
context: .
target: devapp
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
command: python manage.py runserver 0.0.0.0:8080
env_file: .env
ports:
- "8080:8080"
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./docs/:/app/docs:delegated
- ./media/:/app/media:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./locale/:/app/locale:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
# run the tests against local changes
test:
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
env_file: docker/envfiles/test.env
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./media/:/app/media:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./tests/:/app/tests:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
# run tests with no volumes
test-image:
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
env_file: docker/envfiles/test.env
# the django app
release:
build:
context: .
target: release
args:
GIT_SHA: ${GIT_COMMIT:-latest}
BRANCH_NAME: ${BRANCH_NAME:-latest}
image: mozorg/bedrock:${BRANCH_AND_COMMIT:-latest}
release-local:
image: mozorg/bedrock:${BRANCH_AND_COMMIT:-latest}
env_file: .env
ports:
- "8000:8000"
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./locale/:/app/locale:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
builder:
build:
context: .
target: python-builder
image: mozorg/bedrock_build:${GIT_COMMIT:-latest}
app-base:
build:
context: .
target: app-base
image: mozorg/bedrock_code:${GIT_COMMIT:-latest}