config: move default config var to Dockerfile

This commit is contained in:
Sameer Naik
2017-02-13 18:05:04 +05:30
parent 2b6d9a705d
commit 34f40847f1
2 changed files with 6 additions and 6 deletions

View File

@@ -10,11 +10,15 @@ RUN install_packages libc6 libpcre3 libssl1.0.0 zlib1g
# Install nginx
RUN bitnami-pkg unpack nginx-1.10.3-0 --checksum f55a7ac4e3ce28c59596e2bdc21531b8cc7c5991cc84768be804534017db7c9f
RUN ln -sf /opt/bitnami/$BITNAMI_APP_NAME/html /app
RUN ln -sf /opt/bitnami/nginx/html /app
ENV PATH=/opt/bitnami/$BITNAMI_APP_NAME/sbin:/opt/bitnami/$BITNAMI_APP_NAME/bin:/opt/bitnami/common/bin:$PATH
ENV PATH=/opt/bitnami/nginx/sbin:/opt/bitnami/nginx/bin:/opt/bitnami/common/bin:$PATH
COPY rootfs/ /
ENV NGINX_HTTP_PORT=80 \
NGINX_HTTPS_PORT=443
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["nami", "start", "--foreground", "nginx"]

View File

@@ -13,10 +13,6 @@ function initialize {
fi
}
# Set default values
export NGINX_HTTP_PORT=${NGINX_HTTP_PORT:-80}
export NGINX_HTTPS_PORT=${NGINX_HTTPS_PORT:-443}
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
initialize nginx
chown -R :$BITNAMI_APP_USER /bitnami/nginx || true