Skip to content

Commit

Permalink
Converted static site to Spress generated site and updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasvanlierop committed Dec 11, 2016
1 parent ce4082c commit c57f9b2
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,2 +1,2 @@
/web/css/*
!/web/.gitkeep
/build
/src/content/css
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -11,7 +11,7 @@ before_script:
- unexpand -t 4 Makefile > Makefile.tmp && mv Makefile.tmp Makefile

script:
- make
- make test

after_failure:
- docker-compose logs
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Expand Up @@ -2,15 +2,18 @@

SHELL=/bin/bash

all: test
all: build

PROD_FILE='docker-compose.yml'

spress:
docker-compose run spress site:build

sass:
docker-compose run sass --update /app/web/sass:/app/web/css
docker-compose run sass --update /app/src/scss:/app/build/css

build: sass
docker-compose -f ${PROD_FILE} up -d --build --force-recreate
build: sass spress
docker-compose -f ${PROD_FILE} up -d --build --force-recreate --remove-orphans

test: build
tests/smoke-test.sh
Expand Down
10 changes: 9 additions & 1 deletion README.md
@@ -1,4 +1,12 @@
[![Build Status](https://travis-ci.org/lucasvanlierop/website.svg?branch=master)](https://travis-ci.org/lucasvanlierop/website)

#Website about my freelance developer activities.

My website
This site uses [Sass](http://sass-lang.com/) for css and [Spress](http://spress.yosymfony.com/) for static site generation
and runs in [Docker](docker.io). Images are pushed to [Docker Hub](https://hub.docker.com/r/lucasvanlierop/website/)

To develop run: `docker-compose up`

To build and test run: `make test`

To just build run: `make`
File renamed without changes.
14 changes: 11 additions & 3 deletions docker-compose.override.yml
Expand Up @@ -3,14 +3,22 @@ version: '2'
services:
app:
volumes:
- ./web:/usr/share/nginx/html

- ./build:/usr/share/nginx/html
sass:
container_name: lucasvanlierop-website-sass
image: lucasvanlierop/website-sass
build:
context: ./
dockerfile: ./docker/sass/Dockerfile
command: --watch /app/web/sass:/app/web/css
command: --watch /app/src/scss:/app/src/content/css
user: $HOST_UID:$HOST_GID
volumes:
- ./:/app

spress:
container_name: lucasvanlierop-website-spress
image: pantelm/spress
command: site:build --watch
user: $HOST_UID:$HOST_GID
volumes:
- ./:/app
4 changes: 1 addition & 3 deletions docker/app/Dockerfile
@@ -1,5 +1,3 @@
FROM nginx:1.11-alpine

COPY web/index.html /usr/share/nginx/html/index.html
COPY web/img /usr/share/nginx/html/img
COPY web/css /usr/share/nginx/html/css
COPY build /usr/share/nginx/html
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c57f9b2

Please sign in to comment.