Skip to content

Commit 8f20760

Browse files
committed
Add DNS resolver to NGINX configuration test and Docker image run command
1 parent 3586387 commit 8f20760

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
2727
- name: Test NGINX configuration
2828
run: |
29-
UPSTREAM_SERVER=owl.virtualflybrain.org:80 CACHE_MAX_SIZE=20g envsubst '${UPSTREAM_SERVER} ${CACHE_MAX_SIZE}' < nginx.conf.template > test-nginx.conf
29+
UPSTREAM_SERVER=owl.virtualflybrain.org:80 CACHE_MAX_SIZE=20g DNS_RESOLVER="8.8.8.8 1.1.1.1" envsubst '${UPSTREAM_SERVER} ${CACHE_MAX_SIZE} ${DNS_RESOLVER}' < nginx.conf.template > test-nginx.conf
3030
docker run --rm -v $(pwd)/test-nginx.conf:/tmp/nginx.conf nginx:1.26-alpine nginx -t -c /tmp/nginx.conf
3131
3232
- name: Build test Docker image
3333
run: docker build . --file Dockerfile --tag test-image
3434

3535
- name: Test Docker image
3636
run: |
37-
docker run -d --name test-container -e UPSTREAM_SERVER=owl.virtualflybrain.org:80 -e CACHE_MAX_SIZE=20g test-image
37+
docker run -d --name test-container -e UPSTREAM_SERVER=owl.virtualflybrain.org:80 -e CACHE_MAX_SIZE=20g -e DNS_RESOLVER="8.8.8.8 1.1.1.1" test-image
3838
sleep 5
3939
if docker ps | grep -q test-container; then
4040
echo "Container is running successfully"

0 commit comments

Comments
 (0)