Docker Image to develop and server Gatsby sites.
To setup your Gatsby project using this Docker image you need to create:
- Dockerfile
FROM freaz/gatsby:latest
- docker-compose.yaml - meant for running app on prduction
version: '3' services: web: build: . ports: - 80:80
- develop.yaml - for local development
version: '3' services: web: command: develop --host 0.0.0.0 --port 80 volumes: - .:/www
Then running application ready for production with:
$ docker-compose up
and for development with:
$ docker-compose -f docker-compose.yaml -f develop.yaml up