-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
57 lines (53 loc) · 1.54 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
version: '3.5'
services:
resty:
image: lua_resty_netacea:latest
build:
dockerfile: Dockerfile
context: .
container_name: resty
ports:
- "8080:80"
- "443:443"
volumes:
- "./src/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf"
- "./src/lua_resty_netacea.lua:/usr/local/openresty/site/lualib/lua_resty_netacea.lua"
test:
build:
dockerfile: Dockerfile.test
context: .
volumes:
- "./src:/usr/src/src"
- "./test:/usr/src/test"
- "./run_lua_tests.sh:/usr/src/run_lua_tests.sh"
security_opt:
- seccomp:unconfined
command: bash -c '. /usr/src/run_lua_tests.sh -s; exit $$?'
lint:
build:
dockerfile: Dockerfile.test
context: .
volumes:
- "./.luacheckrc:/usr/src/.luacheckrc"
- "./src:/usr/src/src"
- "./test:/usr/src/test"
- "./run_lua_tests.sh:/usr/src/run_lua_tests.sh"
security_opt:
- seccomp:unconfined
command: sh -c 'cd /usr/src && luacheck --no-self -- /usr/src'
nginx_lua:
build:
dockerfile: Dockerfile.nginx_lua
context: .
ports:
- "80:80"
volumes:
- "./.luacheckrc:/usr/src/.luacheckrc"
- "./src:/usr/src/src"
- "./test:/usr/src/test"
- "./run_lua_tests.sh:/usr/src/run_lua_tests.sh"
- "./src/conf/:/opt/nginx/conf/"
- "./src/lua_resty_netacea.lua:/usr/local/share/lua/5.1/lua_resty_netacea.lua"
security_opt:
- seccomp:unconfined
command: sh -c '/opt/nginx/sbin/nginx && tail -f /opt/nginx/logs/access.log'