Skip to content

Commit

Permalink
use the build front in the front dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Nov 28, 2023
1 parent 440dbfa commit 7bca150
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 33 deletions.
1 change: 1 addition & 0 deletions back/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@gouvfr/dsfr": "^1.10.2",
"@nestjs/testing": "^10.0.0",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
Expand Down
12 changes: 6 additions & 6 deletions back/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { KeysGenerator } from './keys/keys-generator';
import { ServeStaticModule } from '@nestjs/serve-static';
import { TypeOrmModule, TypeOrmModuleOptions } from '@nestjs/typeorm';
import { join } from 'path';
import { AppController } from './app.controller';
import { config } from './config';
import { OidcClientModule } from './oidc-client/oidc-client.module';
import { KeysGenerator } from './keys/keys-generator';
import { KeysModule } from './keys/keys.module';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { OidcClientModule } from './oidc-client/oidc-client.module';

const dataSource: TypeOrmModuleOptions = {
type: 'postgres',
Expand All @@ -25,7 +25,7 @@ const dataSource: TypeOrmModuleOptions = {
OidcClientModule,
KeysModule,
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'front'),
rootPath: join(__dirname, '../..', 'front/dist'),
}),
],
controllers: [AppController],
Expand Down
19 changes: 3 additions & 16 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,13 @@ services:
POSTGRES_PASSWORD: pwd
POSTGRES_PORT: 5432
ports:
- "5432:5432"
- '5432:5432'

database-admin:
image: adminer
ports:
- 8080:8080
- 8080:8080
expose:
- "8080"
depends_on:
- database

backend:
build:
context: ./back
volumes:
- ./back:/srv/espace-partenaire/back
- '8080'
depends_on:
- database
ports:
- "3000:3000"
expose:
- "3000"
command: npm run start:dev
19 changes: 13 additions & 6 deletions front/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,28 @@
<title>Espace Partenaire</title>

<!-- DSFR -->
<link rel="apple-touch-icon" href="./dsfr/favicon/apple-touch-icon.png" />
<link rel="icon" href="./dsfr/favicon/favicon.svg" type="image/svg+xml" />
<link
rel="apple-touch-icon"
href="./public/dsfr/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
href="./public/dsfr/favicon/favicon.svg"
type="image/svg+xml"
/>
<link
rel="shortcut icon"
href="./dsfr/favicon/favicon.ico"
href="./public/dsfr/favicon/favicon.ico"
type="image/x-icon"
/>
<link
rel="manifest"
href="./dsfr/favicon/manifest.webmanifest"
href="./public/dsfr/favicon/manifest.webmanifest"
crossorigin="use-credentials"
/>

<link rel="stylesheet" href="./dsfr/utility/icons/icons.min.css" />
<link rel="stylesheet" href="./dsfr/dsfr.min.css" />
<link rel="stylesheet" href="./public/dsfr/utility/icons/icons.min.css" />
<link rel="stylesheet" href="./public/dsfr/dsfr.min.css" />
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 0 additions & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"axios": "^1.6.0",
"npm": "^10.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.16.0",
Expand Down
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"pnpm": ">=8"
},
"private": true,
"devDependencies": {
"prettier": "^3.1.0"
},
"workspaces": [
"back",
"front"
],
"devDependencies": {
"prettier": "^3.1.0"
}
]
}

0 comments on commit 7bca150

Please sign in to comment.