merging from master
This commit is contained in:
commit
7ba442cb17
@ -1,6 +0,0 @@
|
||||
NODE_PORT=3000
|
||||
NODE_ENV=dev
|
||||
DB_HOST=localhost
|
||||
DB_NAME=briques_db
|
||||
DB_USER=briques_llm
|
||||
DB_PASSWORD=briques_password_2025
|
@ -3,5 +3,4 @@ FROM postgres:17
|
||||
WORKDIR /db
|
||||
|
||||
# postgresql will execute the files in that folder after build
|
||||
COPY create.sql drop.sql insert.sql select.sql update.sql /docker-entrypoint-initdb.d/
|
||||
|
||||
COPY build/* /docker-entrypoint-initdb.d/
|
||||
|
@ -2,11 +2,17 @@
|
||||
|
||||
On aime les briques
|
||||
|
||||
## Sujet
|
||||
|
||||
* [Projet: Travail et modalités de rendu Fichier](https://moodle.bordeaux-inp.fr/mod/resource/view.php?id=48191)
|
||||
* [Sujet : Briques Fichier](https://moodle.bordeaux-inp.fr/mod/resource/view.php?id=132493)
|
||||
|
||||
## Dev
|
||||
|
||||
To run postgresql server + adminer in dev environnement (assuming you're running the backend manually with node), run :
|
||||
|
||||
```
|
||||
cp back-end/.env.example back-end/.env
|
||||
docker compose -f docker-compose.dev.yml up
|
||||
```
|
||||
|
||||
|
@ -6,11 +6,12 @@ WORKDIR /usr/src/back
|
||||
|
||||
# Copy sources
|
||||
COPY . .
|
||||
COPY .env.production .env
|
||||
|
||||
# install deps, and pm2 to run the app
|
||||
RUN npm install
|
||||
RUN npm install -g pm2
|
||||
# RUN npm install -g pm2
|
||||
|
||||
COPY .env.production .env
|
||||
|
||||
# Compilation des fichiers TypeScript
|
||||
RUN npm run build
|
||||
@ -23,4 +24,5 @@ RUN chmod -R u=rwx,g=,o= ./
|
||||
EXPOSE 3000
|
||||
|
||||
# Start app
|
||||
CMD ["pm2", "start", "dist/app.js", "--no-daemon"]
|
||||
CMD ["npm", "run", "startonly"]
|
||||
# CMD ["pm2", "start", "dist/app.js", "--no-daemon"]
|
||||
|
@ -2,6 +2,7 @@ services:
|
||||
database:
|
||||
hostname: database
|
||||
container_name: briques_postgres
|
||||
env_file: back-end/.env
|
||||
build:
|
||||
context: ./PostgreSQL
|
||||
dockerfile: Dockerfile
|
||||
|
@ -6,6 +6,7 @@ services:
|
||||
context: ./PostgreSQL
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
env_file: back-end/.env.production
|
||||
environment:
|
||||
- POSTGRES_DB=${DB_NAME}
|
||||
- POSTGRES_USER=${DB_USER}
|
||||
|
Loading…
x
Reference in New Issue
Block a user