Skip to content

Commit

Permalink
Update package.json and docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Feb 6, 2024
1 parent 67660a9 commit 8ad4640
Show file tree
Hide file tree
Showing 4 changed files with 13,910 additions and 12,859 deletions.
5 changes: 5 additions & 0 deletions back/init-mongo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
db.createUser({
user: process.env.MONGODB_USER,
pwd: process.env.MONGODB_USER_PASSWORD,
roles: [{ role: "readWrite", db: process.env.MONGO_INITDB_DATABASE }],
});
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ services:
- MONGODB_USER_PASSWORD=${MONGODB_USER_PASSWORD}
volumes:
- ./back/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./back/.env:/docker-entrypoint-initdb.d/.env:ro
networks:
- web

backend:
container_name: backend
image: node:21
working_dir: /back/src/
command: sh -c "npm install && npm run dev:server"
Expand All @@ -57,6 +57,7 @@ services:
- 3333:3333

front:
container_name: frontend
depends_on:
- traefik
image: node:16
Expand All @@ -78,6 +79,7 @@ services:
- MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE}
- MONGODB_USER=${MONGODB_USER}
- MONGODB_USER_PASSWORD=${MONGODB_USER_PASSWORD}
- BROWSER=none
ports:
- 3000:3000

Expand Down
Loading

0 comments on commit 8ad4640

Please sign in to comment.