Skip to content

Commit 0dc738b

Browse files
authored
Merge pull request #1 from Daily-Utils/feat/dockerhub
feat: dockerhub
2 parents 994318e + 8ccd905 commit 0dc738b

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Push to Docker Hub
2+
3+
on:
4+
# push:
5+
# branches: [ main ]
6+
workflow_dispatch:
7+
inputs:
8+
image-tag:
9+
description: 'Tag to use for the Docker image'
10+
required: true
11+
12+
jobs:
13+
push:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Log in to Docker Hub
21+
uses: docker/login-action@v1
22+
with:
23+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
24+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
25+
26+
- name: Build and push Docker image to specific tag ${{ github.event.inputs.image-tag }}
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: .
30+
push: true
31+
tags: siddh34/illm-express:${{ github.event.inputs.image-tag }}
32+
33+
- name: Build and push Docker image push to latest tag
34+
uses: docker/build-push-action@v2
35+
with:
36+
context: .
37+
push: true
38+
tags: siddh34/illm-express

docker-compose.yml

-21
This file was deleted.

dockerfile

-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
# Use the official Node.js image as the base image
22
FROM node:20
33

4-
# Set the working directory in the container
54
WORKDIR /app
65

7-
# Copy package.json and package-lock.json
86
COPY package*.json ./
97

10-
# Install dependencies
118
RUN npm install
129

13-
# Copy the rest of the application code
1410
COPY . .
1511

16-
# Expose the port the app runs on
1712
EXPOSE 3000
1813

19-
# Command to run the application
2014
CMD ["npm", "start"]

0 commit comments

Comments
 (0)