✨ Introduce Dockerfile
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Developement
|
||||
.git
|
||||
.prettierrc
|
||||
.gitignore
|
||||
README.md
|
||||
|
||||
# Node
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
# Build
|
||||
build
|
||||
|
||||
# Docker
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# Build stage
|
||||
FROM node:lts-alpine as build
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Final stage
|
||||
FROM node:lts-alpine as final
|
||||
EXPOSE 3000
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY --from=build /usr/src/app/build .
|
||||
|
||||
RUN npm i -g serve
|
||||
|
||||
CMD serve
|
||||
@@ -1,3 +1,15 @@
|
||||
# Démineur
|
||||
# Minesweeper
|
||||
|
||||
:)
|
||||
## Docker
|
||||
|
||||
- Build the image
|
||||
|
||||
```bash
|
||||
docker build -t minesweeper .
|
||||
```
|
||||
|
||||
- Run the container
|
||||
|
||||
```bash
|
||||
docker run --name minesweeper -dp 3000:3000 minesweeper
|
||||
```
|
||||
|
||||
Generated
-10
@@ -8,7 +8,6 @@
|
||||
"name": "demineur",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@types/localforage": "^0.0.34",
|
||||
"@types/node": "^20.11.16",
|
||||
"@types/react": "^18.2.53",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
@@ -4159,15 +4158,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
|
||||
},
|
||||
"node_modules/@types/localforage": {
|
||||
"version": "0.0.34",
|
||||
"resolved": "https://registry.npmjs.org/@types/localforage/-/localforage-0.0.34.tgz",
|
||||
"integrity": "sha512-tJxahnjm9dEI1X+hQSC5f2BSd/coZaqbIl1m3TCl0q9SVuC52XcXfV0XmoCU1+PmjyucuVITwoTnN8OlTbEXXA==",
|
||||
"deprecated": "This is a stub types definition for localforage (https://github.com/localForage/localForage). localforage provides its own type definitions, so you don't need @types/localforage installed!",
|
||||
"dependencies": {
|
||||
"localforage": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mime": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/localforage": "^0.0.34",
|
||||
"@types/node": "^20.11.16",
|
||||
"@types/react": "^18.2.53",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
|
||||
@@ -14,7 +14,7 @@ import { atom } from 'recoil';
|
||||
export const gameStateAtom = atom({
|
||||
key: 'gameState',
|
||||
default: {
|
||||
status: 'board',
|
||||
status: 'settings',
|
||||
difficulty: 'beginner',
|
||||
gridSize: 12,
|
||||
bombs: 0,
|
||||
|
||||
Reference in New Issue
Block a user