forked from retoor/devplacepy
chore: bump base image to python 3.13 and switch nginx config to template-based conf.d generation
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ FROM nginx:alpine
|
||||
|
||||
RUN apk add --no-cache gettext
|
||||
|
||||
COPY nginx/nginx.conf.template /etc/nginx/nginx.conf.template
|
||||
COPY nginx/nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY nginx/start.sh /start.sh
|
||||
COPY devplacepy/static /app/static
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ upstream app {
|
||||
server app:10500;
|
||||
}
|
||||
|
||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=app_cache:10m max_size=${NGINX_CACHE_MAX_SIZE:-1g} inactive=60m use_temp_path=off;
|
||||
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=app_cache:10m max_size=${NGINX_CACHE_MAX_SIZE} inactive=60m use_temp_path=off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
+4
-2
@@ -13,8 +13,10 @@ fi
|
||||
export NGINX_CACHE_CONFIG
|
||||
export NGINX_CACHE_MAX_SIZE="${NGINX_CACHE_MAX_SIZE:-1g}"
|
||||
|
||||
mkdir -p /etc/nginx/conf.d
|
||||
|
||||
envsubst '${NGINX_CACHE_CONFIG} ${NGINX_CACHE_MAX_SIZE}' \
|
||||
< /etc/nginx/nginx.conf.template \
|
||||
> /etc/nginx/nginx.conf
|
||||
< /etc/nginx/templates/default.conf.template \
|
||||
> /etc/nginx/conf.d/default.conf
|
||||
|
||||
exec nginx -g 'daemon off;'
|
||||
|
||||
Reference in New Issue
Block a user