add new files
هذا الالتزام موجود في:
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
node_modules
|
||||||
|
build
|
||||||
|
.git
|
||||||
|
.github
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.DS_Store
|
||||||
15
.ghaymah.json
Normal file
15
.ghaymah.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"id": "722d126b-c573-40f1-a738-57002876780b",
|
||||||
|
"name": "cicdproject",
|
||||||
|
"projectId": "896ba892-9448-4061-97e7-b0506ccc3e3a",
|
||||||
|
"ports": [{
|
||||||
|
"expose": true,
|
||||||
|
"number": 80
|
||||||
|
}],
|
||||||
|
"publicAccess": {
|
||||||
|
"enabled": true,
|
||||||
|
"domain": "auto"
|
||||||
|
},
|
||||||
|
"resourceTier": "t2",
|
||||||
|
"dockerFileName": "Dockerfile"
|
||||||
|
}
|
||||||
19
.github/workflows/main.yaml
مباع
Normal file
19
.github/workflows/main.yaml
مباع
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
needs: build_and_push_image
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v5.0.0
|
||||||
|
- name: install ghaymah cli
|
||||||
|
run: curl -sSl https://cli.ghaymah.systems/install.sh | bash
|
||||||
|
|
||||||
|
- name: login to ghaymah
|
||||||
|
run: $HOME/ghaymah/bin/gy auth login --email "${{secrets.GHAYMAH_EMAIL}}" --password "${{secrets.GHAYMAH_PW}}"
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
run: $HOME/ghaymah/bin/gy resource app launch
|
||||||
|
|
||||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM node:20-alpine AS build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:1.27-alpine AS runtime
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY --from=build /app/build /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
16
nginx.conf
Normal file
16
nginx.conf
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /static/ {
|
||||||
|
expires 1y;
|
||||||
|
add_header Cache-Control "public, immutable";
|
||||||
|
}
|
||||||
|
}
|
||||||
المرجع في مشكلة جديدة
حظر مستخدم