Skip to content

Commit 236ff88

Browse files
committed
Fix CMD: Use explicit export for environment variables
- Use 'export VAR=default' instead of just setting variables - Ensures variables are properly exported in shell environment - Fixes GitHub Actions CI/CD pipeline failures with envsubst - Container works reliably across different environments
1 parent a6069d0 commit 236ff88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ RUN mkdir -p /var/cache/nginx && chown -R nginx:nginx /var/cache/nginx && \
1616

1717
EXPOSE 80 8080
1818

19-
CMD ["/bin/sh", "-c", "UPSTREAM_SERVER=${UPSTREAM_SERVER:-owl.virtualflybrain.org:80} CACHE_MAX_SIZE=${CACHE_MAX_SIZE:-20g} DNS_RESOLVER=${DNS_RESOLVER:-8.8.8.8 1.1.1.1} envsubst '${UPSTREAM_SERVER} ${CACHE_MAX_SIZE} ${DNS_RESOLVER}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && /usr/local/bin/health-monitor.sh & nginx -g 'daemon off;'"]
19+
CMD ["/bin/sh", "-c", "export UPSTREAM_SERVER=${UPSTREAM_SERVER:-owl.virtualflybrain.org:80} && export CACHE_MAX_SIZE=${CACHE_MAX_SIZE:-20g} && export DNS_RESOLVER=${DNS_RESOLVER:-8.8.8.8 1.1.1.1} && envsubst '${UPSTREAM_SERVER} ${CACHE_MAX_SIZE} ${DNS_RESOLVER}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && /usr/local/bin/health-monitor.sh & nginx -g 'daemon off;'"]

0 commit comments

Comments
 (0)