💚 last fix for deployment

docker-deployment
Vincent ASTOLFI 9 months ago
parent 5678950806
commit 4db3dd1a35

@ -0,0 +1,11 @@
CREATE DATABASE IF NOT EXISTS battleship;
USE battleship;
CREATE TABLE IF NOT EXISTS users (
pseudo VARCHAR(256),
password VARCHAR(256)
);
CREATE USER 'root' IDENTIFIED WITH mysql_native_password BY 'rootpassword';
GRANT ALL PRIVILEGES ON battleship.* TO 'root';
FLUSH PRIVILEGES;

@ -13,6 +13,7 @@ services:
- DB_USER=root
- DB_PASSWORD=password
- DB_NAME=battleship
- COOKIE_SECRET_KEY=dhdgdnjejf
depends_on:
- db
@ -21,10 +22,8 @@ services:
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: battleship
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
volumes:
db_data:
- ./db:/docker-entrypoint-initdb.d

@ -6,7 +6,7 @@
"scripts": {
"prod": "node index.js",
"dev": "nodemon --env-file=.env index.js",
"start": "node --env-file=.env index.js"
"start": "node index.js"
},
"author": "Vincent Astolfi",
"license": "ISC",

Loading…
Cancel
Save