Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
36c8713f46 | |||
45d1abccfe | |||
8771bbd9ca | |||
15655a6a25 | |||
47c769813d |
11
Dockerfile
11
Dockerfile
@ -1,10 +1,9 @@
|
||||
FROM node:alpine
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY ./dist/review-front/browser /usr/share/nginx/html
|
||||
|
||||
COPY . /usr/src/app
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN npm install -g @angular/cli
|
||||
RUN npm install
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["ng", "serve", "--host", "0.0.0.0"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
@ -11,8 +11,13 @@
|
||||
- [ ] Terminer l'interface admin
|
||||
- [x] Bug (de temps en temps) pour stocker les données utilisateur
|
||||
|
||||
avant de run le docker
|
||||
```
|
||||
npm i
|
||||
ng build --configuration=production
|
||||
```
|
||||
pour run le docker :
|
||||
```
|
||||
sudo docker build -t abonentendeur .
|
||||
sudo docker run -d -p 4200:4200 abonentendeur
|
||||
sudo docker build -t abonentendeur-prod .
|
||||
sudo docker run -d -p 4200:80 abonentendeur-prod
|
||||
```
|
||||
|
11
angular.json
11
angular.json
@ -38,13 +38,13 @@
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kB",
|
||||
"maximumError": "1MB"
|
||||
"maximumWarning": "2MB",
|
||||
"maximumError": "3MB"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kB",
|
||||
"maximumError": "4kB"
|
||||
"maximumWarning": "100kB",
|
||||
"maximumError": "200kB"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
@ -101,5 +101,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
|
13
nginx.conf
Normal file
13
nginx.conf
Normal file
@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
error_page 404 /index.html;
|
||||
}
|
@ -17,6 +17,7 @@ import {Button} from 'primeng/button';
|
||||
import {DialogModule} from 'primeng/dialog';
|
||||
import {AuthService} from '../../auth.service';
|
||||
import {Role} from '../../models/role';
|
||||
import {Meta} from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
selector: 'app-post',
|
||||
@ -46,7 +47,7 @@ export class PostComponent {
|
||||
private postService: PostService,
|
||||
private commentService: CommentService,
|
||||
private messageService: MessageService,
|
||||
private authService: AuthService,) {
|
||||
private authService: AuthService) {
|
||||
this.route.paramMap.subscribe(params => {
|
||||
if (!(this.authService.isSessionExpired()) && this.authService.isAuthenticated()) {
|
||||
const authenticatedAuthor = this.authService.getAuthenticatedAuthor();
|
||||
@ -81,6 +82,14 @@ export class PostComponent {
|
||||
});
|
||||
}
|
||||
|
||||
cutDesc(desc: string): string {
|
||||
let output: string = '';
|
||||
for (let i = 0; i < 256; i++) {
|
||||
output += desc[i];
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
addNewCommentToList(comment: Comment) {
|
||||
this.comments.push(comment);
|
||||
console.log(this.comments)
|
||||
|
@ -5,6 +5,9 @@
|
||||
<meta charset="utf-8">
|
||||
<title>A BON ENTENDEUR</title>
|
||||
<base href="/">
|
||||
<meta property="og:title" content="À bon entendeur">
|
||||
<meta property="og:description" content="Un blog où je partage mon avis sur différentes oeuvres...">
|
||||
<meta property="og:image" content="https://abonentendeur.guams.fr/assets/icon.png">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="icon.png">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
|
Loading…
Reference in New Issue
Block a user