8000 docker-compose autobuild · symfony/symfony-docs@41a5e04 · GitHub
[go: up one dir, main page]

Skip to content

Commit 41a5e04

Browse files
committed
docker-compose autobuild
1 parent b202e64 commit 41a5e04

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.watchmanconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignore_dirs": [".git", "_build/doctrees", "_build/html", ".idea"]
3+
}

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM python:2-stretch
2+
3+
ENV WATCHMAN_VERSION=4.9.0
4+
5+
WORKDIR /www
6+
7+
RUN apt-get update && apt-get install -y libssl-dev pkg-config libtool curl python-dev build-essential ca-certificates autoconf autotools-dev automake && \
8+
curl -LO https://github.com/facebook/watchman/archive/v${WATCHMAN_VERSION}.tar.gz && \
9+
tar xzf v${WATCHMAN_VERSION}.tar.gz && rm v${WATCHMAN_VERSION}.tar.gz && \
10+
cd watchman-${WATCHMAN_VERSION} && ./autogen.sh && ./configure && make && make install && \
11+
apt-get purge -y pkg-config curl build-essential autoconf python-dev libpython-dev autotools-dev automake libtool && \
12+
cd /tmp && rm -rf watchman-${WATCHMAN_VERSION}
13+
14+
RUN pip install virtualenv==15.1.0
15+
16+
COPY ./_build/.requirements.txt /www/_build/
17+
18+
RUN pip install pip==9.0.1 wheel==0.29.0 \
19+
&& pip install -r _build/.requirements.txt
20+
21+
22+

build-entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
make -C /www/_build html
4+
5+
watchman -n -o/dev/stdout -p -j <<-EOT
6+
["trigger", "/www", {
7+
"name": "sphinx",
8+
"command": ["make", "-C", "/www/_build", "html"],
9+
"expression": ["allof",
10+
["not", ["pcre", ".*jb_(tmp|old).*"]]
11+
]
12+
}]
13+
EOT
14+
15+

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: "3"
2+
3+
services:
4+
nginx:
5+
image: nginx:latest
6+
working_dir: /var/www/html
7+
volumes:
8+
- ./_build/html:/usr/share/nginx/html
9+
ports:
10+
- 8000:80
11+
autobuild:
51C9 12+
build:
13+
context: ./
14+
dockerfile: Dockerfile
15+
volumes:
16+
- ./:/www
17+
entrypoint: ./build-entrypoint.sh

0 commit comments

Comments
 (0)
0