Skip to content

Commit

Permalink
Added dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Luis Sanz committed Oct 28, 2018
1 parent beaa782 commit 0a52822
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ RUN mkdir /www /nginxconfigs && \
chown -R www:www /var/lib/nginx && \
chown -R www:www /www

ARG BUILDVAR=sad
RUN if [ "$BUILDVAR" == "SO"]; \
then export SOMEVAR=hello; \
else export SOMEVAR=world; \
fi

RUN bundle exec jekyll build --destination /www

EXPOSE 80:8008
Expand All @@ -29,8 +35,9 @@ WORKDIR /nginxconfigs
RUN mkdir logs && touch access.log
COPY ./configs/nginx.conf /nginxconfigs
COPY ./configs/mime.types /nginxconfigs
CMD nginx -p . -c /nginxconfigs/nginx.conf

RUN touch /repo/.jekyll-metadata
RUN chown -R jekyll /repo
#CMD nginx -p . -c /nginxconfigs/nginx.conf

# $a = Get-Date; docker build --build-arg DATE=$a -t juanlu.is:0.1 .

Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ services:
blog:
build: .
ports:
- 80:8008
- 80:8008
command: nginx -p /nginxconfigs -c /nginxconfigs/nginx.conf
blog-dev:
build: .
ports:
- 4000:4000
command: jekyll serve --host 0.0.0.0 --source /repo --watch --incremental

0 comments on commit 0a52822

Please sign in to comment.