Skip to content

Omar #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
24 changes: 24 additions & 0 deletions .github/workflows/vue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: build and push to docker hub
on:
push:
branches:
- omar
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: omar8magdy
password: "${{ secrets.DOCKERHUB_TOKEN }}"

- name: Build Docker image
run: |
docker build -t omar .
docker tag omar omar8magdy/vue-test:omar
docker push omar8magdy/vue-test:omar

23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use the official Node.js image as the base image
FROM node:22.2.0

# Set the working directory inside the container
WORKDIR /app

# Copy the package.json and package-lock.json to the working directory
COPY package*.json ./

# Install the dependencies
RUN npm install

# Copy the rest of the application files to the working directory
COPY . .

# Build the Vue.js application for production
RUN npm run build

# Expose port 80
EXPOSE 80

# Define the command to run your application
CMD ["node", "start"]