-
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,15 @@ | ||
FROM oclock/static-nginx-nodejs | ||
|
||
# Workaround node-gyp requiring make, gcc, g++ & python: | ||
RUN apk add --no-cache --virtual .build-deps alpine-sdk python | ||
|
||
# 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 libvips fftw-dev --update-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ | ||
|
||
COPY . /src | ||
COPY bin/production-build.sh /bin/production-build.sh | ||
|
||
WORKDIR /var/www | ||
ARG NODE_ENV=production | ||
CMD /bin/production-build.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/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/" | ||
|
||
# Dockerfile doesn't support super(), let's reuse original CMD (to keep the container alive): | ||
while sleep 3600; do :; done | ||
|
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.