mirror of
https://github.com/Floriansylvain/CineAllo.git
synced 2026-08-19 19:53:16 +02:00
🗃️ - DB full init first time it starts w/ docker
This commit is contained in:
@@ -5,7 +5,7 @@ import { showsRouter } from './routes/shows.js'
|
|||||||
|
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
const app = express()
|
const app = express()
|
||||||
const port = process.env.CINEALLO_PORT
|
const port = 3000
|
||||||
|
|
||||||
app.use(logger('dev'))
|
app.use(logger('dev'))
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
|
|||||||
+17
-11
@@ -1,13 +1,4 @@
|
|||||||
services:
|
services:
|
||||||
backend:
|
|
||||||
build: .
|
|
||||||
image: cineallo-backend
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
networks:
|
|
||||||
- back-net
|
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
db:
|
db:
|
||||||
image: mysql:8.0.31
|
image: mysql:8.0.31
|
||||||
env_file:
|
env_file:
|
||||||
@@ -19,8 +10,23 @@ services:
|
|||||||
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
|
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
|
||||||
volumes:
|
volumes:
|
||||||
- ./mysql-data:/var/lib/mysql
|
- ./mysql-data:/var/lib/mysql
|
||||||
# ports:
|
healthcheck:
|
||||||
# - 3306:3306
|
test: [ "CMD", "curl", "-f", "http://localhost:3306" ]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 15s
|
||||||
|
retries: 5
|
||||||
|
backend:
|
||||||
|
build: .
|
||||||
|
image: cineallo-backend
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
networks:
|
||||||
|
- back-net
|
||||||
|
ports:
|
||||||
|
- "${CINEALLO_PORT}:3000"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
back-net:
|
back-net:
|
||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node app.js"
|
"start": "prisma migrate deploy && node app.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@prisma/client": "^4.6.0",
|
"@prisma/client": "^4.6.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user