Skip to content

Commit

Permalink
Move default env vars to 2nd container
Browse files Browse the repository at this point in the history
Carlgo11 committed Aug 16, 2020
1 parent d65f240 commit e8d6f64
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
FROM alpine AS jekyll

###
# Environment variables
###

ENV UNIFI_SITE=default
ENV UNIFI_VERSION=5.13.32

###
# Jekyll
###
@@ -75,9 +68,19 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf
# Bug fixes
RUN mkdir /run/nginx
RUN sed -i 's/cgi.fix_pathinfo= 0/cgi.fix_pathinfo=1/g' /etc/php7/php.ini
ONBUILD RUN chown www:www /opt/www/ -R

COPY --chown=1000 --from=jekyll /opt/www/ /opt/www/
###
# Default Environment variables
###

ENV UNIFI_SITE=default
ENV UNIFI_VERSION=5.13.32

###
# Execution
###

COPY --chown=1000 --from=jekyll /opt/www/ /opt/www/
ONBUILD RUN chown www:www /opt/www/ -R
EXPOSE 80
CMD php-fpm7 && nginx; tail -F /var/log/nginx/error.log

0 comments on commit e8d6f64

Please sign in to comment.