-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (102 loc) · 2.66 KB
/
docker-compose.yml
File metadata and controls
106 lines (102 loc) · 2.66 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
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
# NOTE: you must `export UID` before building
services:
build:
build:
context: &context https://github.com/envoyproxy/toolshed.git#f89fb5df8defa4b7daf9a19a899dbdfbbf3b8d62:docker/bazel
args:
USER_NAME: "${USER}"
USER_ID: &uid "${UID}"
GROUP_ID: &gid "${GID:-}"
APT_PKGS: &apt_pkgs >-
autoconf
automake
bison
build-essential
gawk
git
gnupg2
libffi-dev
libgdbm-dev
libgmp-dev
libncurses5-dev
libreadline-dev
libsqlite3-dev
libssl-dev
libtool
libyaml-dev
pkg-config
sqlite3
zlib1g-dev
command: ./build-website.sh
user: ${UID:-1000}:${GID:-}
volumes: &volumes
- .:/src/workspace/envoy-website
- ~/.cache/bazel:$HOME/.cache/bazel
- ~/.cache/bazelisk:$HOME/.cache/bazelisk
working_dir: /src/workspace/envoy-website
environment:
BAZEL_BUILD_OPTIONS: &bazel_options ${BAZEL_BUILD_OPTIONS:-}
live:
build:
context: *context
target: extra
args:
USER_NAME: ${USER}
USER_ID: *uid
GROUP_ID: *gid
APT_PKGS: *apt_pkgs
EXTRA_APT_PKGS: >-
inotify-tools
command: ./rebuild.sh
user: ${UID:?"`UID` must be set, try `export UID`"}:${GID:-}
volumes: *volumes
working_dir: /src/workspace/envoy-website
environment:
BAZEL_BUILD_OPTIONS: *bazel_options
DEBUG: ${DEBUG:-}
RUN_ON_START: ${RUN_ON_START:-1}
WATCH_COMMAND: inotify
website:
image: nginx
depends_on:
- ${BUILDER:-build}
command:
- /bin/sh
- -c
- |
cat <<EOF > /etc/nginx/conf.d/default.conf
server {
listen 8000;
listen [::]:8000;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
EOF
nginx -g 'daemon off;'
volumes:
- ./_site:/usr/share/nginx/html:z
ports:
- 8000:8000
update:
build:
context: docker
dockerfile: Dockerfile
args:
USER_NAME: "${USERNAME}"
USER_ID: "${UID}"
GROUP_ID: "${GID:-}"
command: ./sync_envoy.sh
user: "${UID:-1000}:${GID:-1000}"
volumes:
- .:/src/workspace/envoy-website
- ${ENVOY_SRC_DIR:-../envoy}:/src/workspace/envoy
- ~/.cache/bazel:/$HOME/.cache/bazel
- ~/.cache/bazelisk:/$HOME/.cache/bazelisk
working_dir: /src/workspace/envoy-website
environment:
ENVOY_SRC_DIR: ../envoy
COMMITTER_NAME: ${COMMITTER_NAME:-}
COMMITTER_EMAIL: ${COMMITTER_EMAIL:-}