-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from typekpb/docker
adding docker
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Publish Docker | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: Glowstudent777/youversion-api | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
default_branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM node:23-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm | ||
|
||
COPY package.json pnpm-lock.yaml ./ | ||
|
||
RUN pnpm install | ||
|
||
COPY . . | ||
|
||
RUN pnpm run build | ||
|
||
|
||
FROM node:23-alpine AS runtime | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/dist ./dist | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml | ||
|
||
RUN npm install -g pnpm && pnpm install --prod | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "dist/index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters