Skip to content

Commit

Permalink
feat: Dockerize demo projects (#377)
Browse files Browse the repository at this point in the history
Co-authored-by: Mrugesh Mohapatra <[email protected]>
  • Loading branch information
scissorsneedfoodtoo and raisedadead authored Apr 13, 2023
1 parent 5eaeec9 commit cf992a5
Show file tree
Hide file tree
Showing 192 changed files with 74,746 additions and 11,198 deletions.
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Ignore minified libraries
apps/voting-app/public/*.min.js
# Ignore bundles
apps/build-a-pinterest-clone/public/bundle.js
apps/p2p-video-chat-application/public/bundle.js
apps/**/public/bundle.js
# Ignore test runner files?
apps/**/assertion-analyser.js
apps/**/test-runner.js
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Node.js CI
on:
pull_request:
branches:
- master
- main

jobs:
ci:
Expand All @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [16]
node-version: [18]
fail-fast: false

steps:
Expand All @@ -23,14 +23,22 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Start database
uses: supercharge/mongodb-github-action@d26215f71b2ce60420a2a3776a25893d11a65f85 # v1.9.0

- name: Install Dependencies
run: npm ci

- name: Lint Files
run: npm run lint

- name: Create .env File For CI Builds
run: cp sample.env .env

- name: Start Projects
run: |
npm run build -- --no-cache
npm start
- name: Sleep For 15 Seconds
run: sleep 15

- name: Run Tests
run: npm run test-local-or-ci
run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
apps/stock-price-checker-proxy/cache/
apps/twitch-proxy/.data/
apps/twitch-proxy/.logs/
Caddyfile
6 changes: 6 additions & 0 deletions apps/25--5-clock/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
.git
.gitignore
.dockerignore
node_modules
Dockerfile
2 changes: 1 addition & 1 deletion apps/25--5-clock/client/.babelrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
["@babel/env", { "targets": "> 0.25%, not dead" }],
["@babel/preset-env", { "targets": "> 0.25%, not dead" }],
"@babel/preset-react"
]
}
8 changes: 6 additions & 2 deletions apps/25--5-clock/client/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ class Timer extends React.Component {
<div className='author'>
{' '}
Designed and Coded by <br />
<a href='https://goo.gl/6NNLMG' target='_blank'>
<a
href='https://www.freecodecamp.org/no-stack-dub-sack'
target='_blank'
rel='noreferrer'
>
Peter Weinberg
</a>
</div>
Expand All @@ -267,7 +271,7 @@ class Timer extends React.Component {
ref={audio => {
this.audioBeep = audio;
}}
src='https://raw.githubusercontent.com/freeCodeCamp/cdn/master/build/testable-projects-fcc/audio/BeepSound.wav'
src='https://cdn.freecodecamp.org/testable-projects-fcc/audio/BeepSound.wav'
/>
</div>
);
Expand Down
Loading

0 comments on commit cf992a5

Please sign in to comment.