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()
|
||||
const app = express()
|
||||
const port = process.env.CINEALLO_PORT
|
||||
const port = 3000
|
||||
|
||||
app.use(logger('dev'))
|
||||
app.use(express.json())
|
||||
|
||||
+18
-12
@@ -1,13 +1,4 @@
|
||||
services:
|
||||
backend:
|
||||
build: .
|
||||
image: cineallo-backend
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- back-net
|
||||
ports:
|
||||
- 3000:3000
|
||||
db:
|
||||
image: mysql:8.0.31
|
||||
env_file:
|
||||
@@ -19,8 +10,23 @@ services:
|
||||
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
|
||||
volumes:
|
||||
- ./mysql-data:/var/lib/mysql
|
||||
# ports:
|
||||
# - 3306:3306
|
||||
healthcheck:
|
||||
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:
|
||||
back-net:
|
||||
back-net:
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "node app.js"
|
||||
"start": "prisma migrate deploy && node app.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "^4.6.0",
|
||||
|
||||
Reference in New Issue
Block a user