mirror of
https://github.com/YuzuZensai/SimpleStaticExpress.git
synced 2026-01-06 04:33:28 +00:00
Dockerized
This commit is contained in:
13
.dockerignore
Normal file
13
.dockerignore
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
.dockerignore
|
||||||
|
Dockerfile
|
||||||
|
docker-compose.yml
|
||||||
|
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
.env
|
||||||
|
public
|
||||||
|
|
||||||
|
configs
|
||||||
|
.vscode
|
||||||
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM node
|
||||||
|
WORKDIR /home/node/app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
CMD [ "node", "index.js"]
|
||||||
@@ -10,5 +10,10 @@
|
|||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
"express": "^4.18.1",
|
"express": "^4.18.1",
|
||||||
"serve-index": "^1.9.1"
|
"serve-index": "^1.9.1"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "node index.js",
|
||||||
|
"docker-build": "docker build . -t ghcr.io/yuzuzensai/simplestaticexpress:latest",
|
||||||
|
"docker-run": "docker run -d --name SimpleStaticExpress --mount type=bind,source=\"$(pwd)\"/public,target=/home/node/app/public --network host --env-file .env ghcr.io/yuzuzensai/simplestaticexpress:latest"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user