-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 1.22 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
# Also see:
# Dockerfile
#
# https://docs.docker.com/compose/compose-file
services:
web:
build:
context: .
dockerfile: dev/web/Dockerfile
# Use Bash instad of sh (Dash) for improved signal handling
command: /bin/bash -c "
echo 'Starting static webserver at http://127.0.0.1:8080/';
/usr/local/bin/httpd-foreground
"
container_name: cc-search-web
ports:
- '8080:80'
restart: on-failure
volumes:
# Mount site configuration directory
- './config:/usr/local/apache2/conf/config:ro'
# Mount website directory
- './src:/usr/local/apache2/htdocs:ro'
node:
build:
context: .
dockerfile: dev/node/Dockerfile
# Continue running until shutdown (this allows docker compose exec which is
# much faster than docker compose run)
# Thank you: https://serverfault.com/a/1084975
command: /bin/sh -c "
trap 'exit' TERM;
echo 'Run the following command to format files with Prettier:';
echo ' docker compose exec node prettier --write src/';
while true; do sleep 1; done
"
container_name: cc-search-node
volumes:
# Mount repository to working directory
- './:/opt'
working_dir: /opt