-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
- https://deviensdev-preprod.nico.oclock.io/ - déploiement sur PaaS Dokku (deviensdev-preprod) - variables d'environnements : - DEVIENSDEV_GITHUB_TOKEN=... - ENV=production - NODE_ENV=production - mapping de ports http:80:80 https:443:80 - Fix: "gatsby build" plante à cause de la gestion de .mjs par Wepback 4 @see gatsbyjs/gatsby#8583 (comment)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.cache | ||
CHANGELOG.md | ||
.circleci | ||
CONTRIBUTING.md | ||
.git | ||
.gitignore | ||
LICENSE | ||
node_modules | ||
public | ||
README.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,10 @@ Thumbs.db | |
/.cache | ||
|
||
# Build Compiled. | ||
/public | ||
# /public | ||
|
||
# Logs | ||
/*.log | ||
|
||
# Config | ||
/config/index.js | ||
|
||
#/config/index.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM oclock/static-nginx-nodejs | ||
|
||
# Workaround node-gyp requiring make, gcc, g++ & python: | ||
RUN apk update && \ | ||
apk add --no-cache --update alpine-sdk python yarn | ||
|
||
# Workaround for error: "ERR! sharp Use with musl libc requires manual installation of libvips >= 8.6.1" | ||
# => http://sharp.pixelplumbing.com/en/stable/install/#alpine-linux | ||
# RUN apk add vips-dev fftw-dev build-base --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted | ||
# https://bugs.alpinelinux.org/issues/9561 => add edge/main for some of the sub-dependencies | ||
# https://bugs.alpinelinux.org/issues/8087 => don't use https:// for --repository URLs | ||
RUN apk add vips-dev fftw-dev build-base \ | ||
--update-cache \ | ||
--repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \ | ||
--repository http://dl-3.alpinelinux.org/alpine/edge/main \ | ||
--allow-untrusted | ||
|
||
COPY . /src | ||
COPY bin/production-build.sh /bin/production-build.sh | ||
|
||
WORKDIR /var/www | ||
ARG NODE_ENV=production | ||
RUN /bin/production-build.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
# node-gyp is required by gatsby but not in the project's package.json (add it?) | ||
yarn global add node-gyp | ||
|
||
# Building the static website :) | ||
cd /src | ||
yarn --pure-lockfile --non-interactive | ||
rm -rf ./public | ||
./node_modules/.bin/gatsby build | ||
|
||
# Building the static website inside the container requires moving the public/ | ||
# output to /var/www, which has to work around the * expansion limitation inside | ||
# running containers not running commands through a shell. | ||
# @see https://stackoverflow.com/questions/44390360/mv-command-throwing-error-but-executing-fine-in-docker | ||
sh -c "mv public/* /var/www/" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
GITHUB_TOKEN: process.env.DEVIENSDEV_GITHUB_TOKEN, | ||
}; |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.