Skip to content

Commit 9aff321

Browse files
committed
Add/updates templates
1 parent bbcb5b1 commit 9aff321

5 files changed

Lines changed: 23 additions & 5 deletions

File tree

templates/.dockerignore Nodejs app

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/node_modules
2-
/Docker
32
.gitignore
43
.gitattributes
54
LICENSE
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/node_modules
2+
/build
3+
.gitignore
4+
.gitattributes
5+
LICENSE
6+
README.md

templates/Deno app.dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:21.04
2+
WORKDIR /usr/src/app
3+
# Install Deno
4+
RUN apt update && apt-get install unzip -y && apt install -y curl
5+
RUN curl -fsSL https://deno.land/x/install/install.sh | sh
6+
# Copy all not-ignored files to volume
7+
COPY . .
8+
# Cache the dependencies of your script
9+
RUN /root/.deno/bin/deno cache index.ts
10+
EXPOSE 8000
11+
CMD [ "/root/.deno/bin/deno", "run", "--allow-net", "index.ts"]

templates/Nodejs app.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12
1+
FROM node:14-slim
22
WORKDIR /usr/src/app
33
COPY package*.json ./
44
RUN npm ci

templates/Reactjs app.dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
FROM node:12
1+
FROM node:14-slim
22
WORKDIR /usr/src/app
33
COPY package*.json ./
44
RUN npm ci
55
COPY . .
6-
EXPOSE 3000
7-
CMD [ "npm", "start" ]
6+
RUN npm run build
7+
RUN npm i -g serve
8+
EXPOSE 5000
9+
CMD [ "serve", "-S" , "build"]

0 commit comments

Comments
 (0)