-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0660e09
commit 59c294b
Showing
3 changed files
with
91 additions
and
0 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,35 @@ | ||
# Node modules should not be copied to the Docker image as they are re-installed during the build process. | ||
node_modules | ||
npm-debug.log | ||
yarn-debug.log | ||
yarn-error.log | ||
|
||
# Exclude the local environment variables | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# Output directories | ||
dist | ||
build | ||
|
||
# Exclude Dockerfile and Docker ignore file itself | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore any git-related files | ||
.git | ||
.gitignore | ||
|
||
# Exclude local development files and tools | ||
.vscode | ||
.idea | ||
*.swp | ||
|
||
# OS generated files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Logs and temporary files | ||
*.log | ||
*.tmp |
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,33 @@ | ||
name: Admin App Docker Build and Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/apekade_admin:latest |
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,23 @@ | ||
# Use an official Node.js runtime as a parent image | ||
FROM node:20-alpine | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json | ||
COPY package.json package-lock.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the application files | ||
COPY . . | ||
|
||
# Build the app | ||
RUN npm run build | ||
|
||
# Expose port 80 | ||
EXPOSE 5345 | ||
|
||
# Start nginx | ||
CMD ["npm","run","dev"] |