Skip to content

Commit 5cded51

Browse files
committed
adding docker
1 parent 1153320 commit 5cded51

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

.github/workflows/docker.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Publish Docker
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Publish to Registry
9+
uses: elgohr/Publish-Docker-Github-Action@v5
10+
with:
11+
name: Glowstudent777/youversion-api
12+
username: ${{ secrets.DOCKER_USERNAME }}
13+
password: ${{ secrets.DOCKER_PASSWORD }}
14+
default_branch: main

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM node:23-alpine AS builder
2+
3+
WORKDIR /app
4+
5+
RUN npm install -g pnpm
6+
7+
COPY package.json pnpm-lock.yaml ./
8+
9+
RUN pnpm install
10+
11+
COPY . .
12+
13+
RUN pnpm run build
14+
15+
16+
FROM node:23-alpine AS runtime
17+
18+
WORKDIR /app
19+
20+
COPY --from=builder /app/dist ./dist
21+
COPY --from=builder /app/package.json ./package.json
22+
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
23+
24+
RUN npm install -g pnpm && pnpm install --prod
25+
26+
EXPOSE 3000
27+
28+
CMD ["node", "dist/index.js"]

src/swagger/swaggerOptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export const swaggerOptions: swaggerJSDoc.Options = {
1313
}
1414
},
1515
apis: [
16-
"./src/api/v1/verse/*.ts",
17-
"./src/api/v1/votd/*.ts",
18-
"./src/api/v1/status.ts"
16+
"./dist/api/v1/verse/*.js",
17+
"./dist/api/v1/votd/*.js",
18+
"./dist/api/v1/status.js"
1919
]
2020
};

0 commit comments

Comments
 (0)