gatsbyjs / gatsby-docker

Docker image that builds and hosts a Gatsby site
MIT License
356 stars 88 forks source link

500 Server Error when running via Docker #17

Closed Pet3ris closed 5 years ago

Pet3ris commented 5 years ago

I have a working gatsbyjs project that doesn't run from the official Docker image.

This is the Dockerfile (based on a related issue.

FROM gatsbyjs/gatsby:latest
ADD public/ /pub

(the compiled website is at public/ and I've confirmed the index.html renders the website correctly)

I also tried the official Dockerfile, which didn't work:

FROM gatsbyjs/gatsby:onbuild

I'm running this from docker-compose as follows:

version: '3'

services:
  website:
    build: .
    ports:
      - "80:80"

Nginx returns a "500 Internal Server Error".

I'm following the official tutorial here.

This is also submitted as a StackOverflow question here.