Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/rivo2302/M1Front
Browse files Browse the repository at this point in the history
  • Loading branch information
Landris18 committed Feb 24, 2024
2 parents 8ed9ff2 + 4284bf7 commit fdbd3dd
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Fichiers et dossiers de node
node_modules
npm-debug.log

# Dossiers de build et de cache
dist
.tmp
.cache

# Fichiers de configuration et d'environnement
.dockerignore
Dockerfile
.git
.gitignore
README.md
LICENSE
*.md

# Fichiers spécifiques à l'éditeur
.vscode
.idea
*.sublime-project
*.sublime-workspace

# Autres fichiers et dossiers inutiles pour la construction ou l'exécution de l'application
*.spec.ts
*.test.ts
*.sass-cache
28 changes: 28 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Odoo Middleware CI/CD

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: SSH into the deployment server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_KEY }}
script: |
cd /opt/test/M1Front
sudo git pull
sudo docker build -t front .
sudo docker rm -f m1front
docker run -d -p 8010:80 --name m1front front:latest
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:14 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM nginx:alpine as deploy-stage
COPY --from=build-stage /app/dist/fuse /usr/share/nginx/html
COPY default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
8 changes: 8 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
2 changes: 1 addition & 1 deletion src/app/layout/common/search/search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<mat-option
class="py-0 px-6 text-md pointer-events-none text-secondary bg-transparent"
*ngIf="resultSets && !resultSets.length">
No results found!
No result found!
</mat-option>
<ng-container *ngFor="let resultSet of resultSets; trackBy: trackByFn">
<mat-optgroup class="flex items-center mt-2 px-2">
Expand Down

0 comments on commit fdbd3dd

Please sign in to comment.