1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 18:48:28 -04:00

remove docker stuff (it doesn't play nice with webpack/gulp/etc.)

This commit is contained in:
Jake Jarvis 2021-06-27 10:17:58 -04:00
parent f5f64eb87e
commit fde728bf22
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
8 changed files with 22 additions and 50 deletions

View File

@ -10,3 +10,5 @@ LHCI_SERVER_BASE_URL=
LHCI_TOKEN= LHCI_TOKEN=
LHCI_ADMIN_TOKEN= LHCI_ADMIN_TOKEN=
LHCI_GITHUB_APP_TOKEN= LHCI_GITHUB_APP_TOKEN=
SENTRY_AUTH_TOKEN=
SENTRY_DSN=

View File

@ -17,10 +17,8 @@ jobs:
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
node-version: 14.x node-version: 14.x
- name: Install dependencies - run: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile - run: yarn lint
- name: Run linters
run: yarn lint
snapshot: snapshot:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -32,11 +30,8 @@ jobs:
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
node-version: 14.x node-version: 14.x
- name: Install dependencies - run: yarn install --frozen-lockfile
run: yarn install --frozen-lockfile - run: yarn build
- name: Build site - uses: percy/snapshot-action@v0.1.2
run: yarn build
- name: Percy snapshots
uses: percy/snapshot-action@v0.1.2
env: env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

View File

@ -15,6 +15,9 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 14.x
- uses: getsentry/action-release@v1 - uses: getsentry/action-release@v1
if: github.event.deployment_status.environment == 'production' if: github.event.deployment_status.environment == 'production'
env: env:
@ -23,9 +26,6 @@ jobs:
SENTRY_PROJECT: jarvis SENTRY_PROJECT: jarvis
with: with:
environment: ${{ github.event.deployment_status.environment }} environment: ${{ github.event.deployment_status.environment }}
- uses: actions/setup-node@v2
with:
node-version: 12.x
- uses: browser-actions/setup-chrome@latest - uses: browser-actions/setup-chrome@latest
with: with:
chrome-version: stable chrome-version: stable

View File

@ -1,13 +0,0 @@
# pulls from pre-built Hugo base image:
# https://github.com/jakejarvis/hugo-docker/blob/master/Dockerfile
FROM ghcr.io/jakejarvis/hugo-extended:0.84.1
ADD package.json .
ADD yarn.lock .
RUN yarn install
# expose live-refresh server (on custom port)
EXPOSE 1337
ENTRYPOINT ["yarn"]
CMD ["start"]

View File

@ -17,18 +17,6 @@ I keep an ongoing list of [blog post ideas](https://github.com/jakejarvis/jarv.i
Run `yarn install` ([Yarn must be installed](https://yarnpkg.com/en/docs/install) first; NPM _should_ work at your own risk) and `yarn start`, then open [http://localhost:1337/](http://localhost:1337/). Pages will live-refresh when source files are changed. Run `yarn install` ([Yarn must be installed](https://yarnpkg.com/en/docs/install) first; NPM _should_ work at your own risk) and `yarn start`, then open [http://localhost:1337/](http://localhost:1337/). Pages will live-refresh when source files are changed.
### 🐳  Using Docker:
To ensure consistency and compatibility, the [`Dockerfile`](Dockerfile) in this repository will download the correct version of the Hugo Extended binary and its dependencies, and start a live testing server in a temporary container.
Using Docker doesn't require Node or Yarn, but you can also use `yarn docker` which is simply an alias for:
```bash
docker run --rm -v $(pwd):/src -p 1337:1337 $(docker build --no-cache -q .)
```
Once built, these two methods act identically — simply open [http://localhost:1337/](http://localhost:1337/) as above.
### 🤯  Why does this sound _way_ more complex than it needs to be?! ### 🤯  Why does this sound _way_ more complex than it needs to be?!
[Because it is.](https://www.jvt.me/talks/overengineering-your-personal-website/) [Because it is.](https://www.jvt.me/talks/overengineering-your-personal-website/)

View File

@ -24,7 +24,6 @@
"lint:scss": "stylelint 'assets/sass/**/*.scss' --syntax scss", "lint:scss": "stylelint 'assets/sass/**/*.scss' --syntax scss",
"lint:md": "markdownlint 'content/**/*.md'", "lint:md": "markdownlint 'content/**/*.md'",
"lint:prettier": "prettier --check .", "lint:prettier": "prettier --check .",
"docker": "docker run --rm -v $(pwd):/src:ro -p 1337:1337 $(docker build -q .)",
"percy": "npx percy snapshot" "percy": "npx percy snapshot"
}, },
"dependencies": { "dependencies": {
@ -34,7 +33,7 @@
"@sentry/node": "^6.7.2", "@sentry/node": "^6.7.2",
"@sentry/tracing": "^6.7.2", "@sentry/tracing": "^6.7.2",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"faunadb": "fauna/faunadb-js#master", "faunadb": "^4.3.0",
"graphql": "^15.5.1", "graphql": "^15.5.1",
"graphql-request": "^3.4.0", "graphql-request": "^3.4.0",
"graphql-tag": "^2.12.5", "graphql-tag": "^2.12.5",

View File

@ -13,7 +13,7 @@ module.exports = {
path.resolve(__dirname, "assets/sass/main.scss"), path.resolve(__dirname, "assets/sass/main.scss"),
], ],
mode: isProd ? "production" : "development", mode: isProd ? "production" : "development",
devtool: "source-map", devtool: isProd ? "nosources-source-map" : "source-map",
output: { output: {
filename: isProd ? "js/[name]-[contenthash:8].js" : "js/[name].js", filename: isProd ? "js/[name]-[contenthash:8].js" : "js/[name].js",
path: path.resolve(__dirname, "static/assets/"), path: path.resolve(__dirname, "static/assets/"),
@ -60,11 +60,12 @@ module.exports = {
{ {
test: /\.(sa|sc|c)ss$/i, test: /\.(sa|sc|c)ss$/i,
use: [ use: [
{ loader: MiniCssExtractPlugin.loader }, MiniCssExtractPlugin.loader,
{ loader: "css-loader" }, { loader: "css-loader", options: { sourceMap: true } },
{ {
loader: "postcss-loader", loader: "postcss-loader",
options: { options: {
sourceMap: true,
postcssOptions: { postcssOptions: {
config: false, config: false,
plugins: [ plugins: [
@ -84,7 +85,7 @@ module.exports = {
}, },
}, },
}, },
{ loader: "sass-loader" }, { loader: "sass-loader", options: { sourceMap: true } },
], ],
}, },
{ {
@ -131,7 +132,6 @@ module.exports = {
devServer: { devServer: {
contentBase: path.join(__dirname, "public/"), contentBase: path.join(__dirname, "public/"),
publicPath: "/assets/", publicPath: "/assets/",
// host: "0.0.0.0", // required when inside Docker
port: process.env.PORT || 1337, port: process.env.PORT || 1337,
compress: true, compress: true,
}, },

View File

@ -1241,9 +1241,9 @@
form-data "^3.0.0" form-data "^3.0.0"
"@types/node@*": "@types/node@*":
version "15.12.4" version "15.12.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.4.tgz#e1cf817d70a1e118e81922c4ff6683ce9d422e26" resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.5.tgz#9a78318a45d75c9523d2396131bd3cca54b2d185"
integrity sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA== integrity sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==
"@types/normalize-package-data@^2.4.0": "@types/normalize-package-data@^2.4.0":
version "2.4.0" version "2.4.0"
@ -4465,9 +4465,10 @@ fastq@^1.6.0:
dependencies: dependencies:
reusify "^1.0.4" reusify "^1.0.4"
faunadb@fauna/faunadb-js#master: faunadb@^4.3.0:
version "4.3.0" version "4.3.0"
resolved "https://codeload.github.com/fauna/faunadb-js/tar.gz/5ef5d1a10e7e707ec943edf946d7c1af4272525b" resolved "https://registry.yarnpkg.com/faunadb/-/faunadb-4.3.0.tgz#7c272b108c4be46eb8e58f9dfa37366adc9e9602"
integrity sha512-H5ZnInUNLAvrjqDHYXmYX+S55HP8Ib85QbF/UK1fV/bz125unl7J7LbjqKvMGcREYqOvIrpQCaniK1LwAkXHTw==
dependencies: dependencies:
abort-controller "^3.0.0" abort-controller "^3.0.0"
base64-js "^1.2.0" base64-js "^1.2.0"