diff --git a/.gitignore b/.gitignore index 30bc162..5685538 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/node_modules \ No newline at end of file +/node_modules +/mysql \ No newline at end of file diff --git a/db.js b/db.js index 06cebd4..d8bbff6 100644 --- a/db.js +++ b/db.js @@ -1,7 +1,7 @@ const mysql = require('mysql'); const logcon = mysql.createConnection({ - host: 'localhost', + host: 'db', user: 'user', password: 'user', database: 'users' diff --git a/docker-compose.yaml b/docker-compose.yaml index c1275e5..47f4f45 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,11 +8,22 @@ services: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: root + volumes: + - ./mysql/:/var/lib/mysql - phpmyadmin: - image: phpmyadmin + node: + build: + context: . + dockerfile: Dockerfile restart: always ports: - - 2000:80 - environment: - - PMA_ARBITRARY=1 \ No newline at end of file + - 8080:8080 + volumes: + - ./:/usr/src/app + # phpmyadmin: + # image: phpmyadmin + # restart: always + # ports: + # - 2000:80 + # environment: + # - PMA_ARBITRARY=1 \ No newline at end of file diff --git a/index.js b/index.js index 4ce07e2..c372829 100644 --- a/index.js +++ b/index.js @@ -385,4 +385,4 @@ app.all('*', (req, res) => { res.status(404).send('