Skip to content

Commit

Permalink
upgrade to epicshop
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Apr 24, 2024
1 parent 16c2959 commit ba6e12e
Show file tree
Hide file tree
Showing 40 changed files with 5,655 additions and 13,867 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:

- name: 🚀 Deploy
run: flyctl deploy --remote-only
working-directory: ./scripts/deployed
working-directory: ./epicshop
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

28 changes: 0 additions & 28 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions kcdshop/.diffignore → epicshop/.diffignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
tsconfig.json
*.test.*
21 changes: 21 additions & 0 deletions epicshop/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:20-bookworm-slim as base

RUN apt-get update && apt-get install -y git

ENV EPICSHOP_CONTEXT_CWD="/myapp/workshop-content"
ENV EPICSHOP_DEPLOYED="true"
ENV EPICSHOP_DISABLE_WATCHER="true"
ENV FLY="true"
ENV PORT="8080"
ENV NODE_ENV="production"

WORKDIR /myapp

ADD . .

RUN npm install --omit=dev

CMD rm -rf ${EPICSHOP_CONTEXT_CWD} && \
git clone https://github.com/epicweb-dev/advanced-react-patterns ${EPICSHOP_CONTEXT_CWD} && \
cd ${EPICSHOP_CONTEXT_CWD} && \
npx epicshop start
4 changes: 2 additions & 2 deletions scripts/fix-watch.js → epicshop/fix-watch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chokidar from 'chokidar'
import path from 'node:path'
import { $ } from 'execa'
import { fileURLToPath } from 'node:url'
import chokidar from 'chokidar'
import { $ } from 'execa'

const __dirname = path.dirname(fileURLToPath(import.meta.url))
const here = (...p) => path.join(__dirname, ...p)
Expand Down
2 changes: 1 addition & 1 deletion scripts/fix.js → epicshop/fix.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This should run by node without any dependencies
// because you may need to run it without deps.

import fs from 'node:fs'
import cp from 'node:child_process'
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

Expand Down
1 change: 1 addition & 0 deletions scripts/deployed/fly.toml → epicshop/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ primary_region = "sjc"
kill_signal = "SIGINT"
kill_timeout = 5
processes = [ ]
swap_size_mb = 512

[experimental]
allowed_public_ports = [ ]
Expand Down
Loading

0 comments on commit ba6e12e

Please sign in to comment.