File tree Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Expand file tree Collapse file tree 4 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ jobs:
10
10
runs-on : ubuntu-22.04
11
11
steps :
12
12
- name : Checkout
13
- uses : actions/checkout@v2
14
-
13
+ uses : actions/checkout@v3
15
14
- name : Build
16
15
run : docker build --tag tivix/docker-nginx .
17
-
16
+ - name : Check
17
+ run : docker-compose run proxy test
18
18
- name : Push
19
19
run : |
20
20
echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
Original file line number Diff line number Diff line change 1
- FROM alpine:3.12
1
+ FROM alpine:3.17
2
2
3
3
RUN apk add --no-cache\
4
- nginx~=1.18 \
5
- py3-pip \
6
- curl \
7
- openssl &&\
4
+ 'nginx~=1.22' \
5
+ 'py3-pip~=22.3.1' &&\
8
6
pip3 install --no-cache-dir \
9
7
j2cli==0.3.10 \
10
- boto3==1.12.26 &&\
11
- curl -o /usr/local/bin/waitforit -sSL https://github.com/maxcnunes/waitforit/releases/download/v2.4.1/waitforit-linux_amd64 && \
8
+ boto3==1.26.114 &&\
9
+ wget -q " https://github.com/maxcnunes/waitforit/releases/download/v2.4.1/waitforit-linux_amd64" -O /usr/local/bin/waitforit && \
12
10
chmod +x /usr/local/bin/waitforit &&\
13
- rm -rf /etc/nginx/nginx.conf /etc/nginx/conf.d/*
11
+ rm -rf /etc/nginx/nginx.conf /etc/nginx/conf.d/* &&\
12
+ mkdir -p /etc/nginx/conf.d/
14
13
15
14
COPY ./ /code/
16
15
COPY docker-entrypoint.sh aws_sm /usr/local/bin/
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ services:
32
32
- CSP_OBJECT_SRC=object-src.com
33
33
- CSP_MEDIA_SRC=media-src.com
34
34
- CSP_FRAME_SRC=frame-src.com
35
+ depends_on :
36
+ - service_a
37
+ - service_b
35
38
36
39
service_a :
37
40
image : containous/whoami
Original file line number Diff line number Diff line change 3
3
mkdir -p /run/nginx/
4
4
rm -rf /run/nginx/nginx.pid
5
5
6
- if [ ${# } -eq 0 ]; then
6
+ if [ " ${# } " -eq 0 ] || [ " ${1} " == " test " ]; then
7
7
echo " Starting docker-nginx"
8
8
9
9
j2 --undefined /code/templates/nginx.conf.j2 > /etc/nginx/nginx.conf
@@ -38,8 +38,13 @@ if [ ${#} -eq 0 ]; then
38
38
cat ${i}
39
39
done
40
40
fi
41
- echo " Starting nginx"
42
- exec nginx -g ' daemon off;'
41
+
42
+ if [ " ${1} " == " test" ]; then
43
+ nginx -t
44
+ else
45
+ echo " Starting nginx"
46
+ exec nginx -g ' daemon off;'
47
+ fi
43
48
else
44
49
exec " ${@ } "
45
50
fi
You can’t perform that action at this time.
0 commit comments