Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit dc6fca0

Browse files
author
Matteus
committed
DMCD added
1 parent 9737c9c commit dc6fca0

3 files changed

Lines changed: 54 additions & 1 deletion

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docker Image
2+
3+
on:
4+
push:
5+
paths:
6+
- 'src/**'
7+
branches:
8+
- master
9+
10+
11+
jobs:
12+
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Docker login
20+
env:
21+
DOCKER_USER: ${{secrets.DOCKER_USERNAME}}
22+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
23+
run: |
24+
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
25+
- name: Build the Docker image
26+
run: docker build . --file Dockerfile --tag tolfixorg/githubviews:latest
27+
- name: Docker push
28+
run: docker push tolfixorg/githubviews:latest

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:14-alpine
2+
3+
LABEL author="Tolfix" maintainer="support@tolfix.com"
4+
5+
RUN apk update && \
6+
apk upgrade && \
7+
apk add git
8+
9+
RUN npm install -g @types/node \
10+
&& npm install -g typescript
11+
12+
WORKDIR /usr/src
13+
14+
COPY package*.json ./
15+
16+
RUN npm install
17+
18+
COPY . ./
19+
20+
RUN tsc -b
21+
22+
ENV DB ""
23+
24+
EXPOSE 8080
25+
26+
CMD [ "node", "./build/Server.js" ]

src/Server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ server.use(express.urlencoded({ extended: true }));
2323

2424
server.use((req, res, next) => {
2525
res.setHeader('X-Powered-By', 'Tolfix');
26-
2726
next();
2827
});
2928

0 commit comments

Comments
 (0)