From 899f26ab355a3f2c88bebec432ea677e7325ee27 Mon Sep 17 00:00:00 2001 From: Aelita4 Date: Fri, 16 Sep 2022 18:57:14 +0200 Subject: [PATCH] Update docker-compose --- docker-compose.yml | 34 ++++++---------------------------- src/index.ts | 2 +- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a660c93..6fc435f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,40 +3,18 @@ services: app: container_name: sshmon_main restart: always - image: sshmon + image: sshmon:surreal ports: - "8080:8080" - depends_on: - - mysql networks: - network - mysql: - container_name: sshmon_mysql + surrealdb: + container_name: sshmon_surrealdb restart: always - image: mysql:latest - environment: - MYSQL_ROOT_PASSWORD: 'root' + image: surrealdb/surrealdb:latest + command: start --user root --pass root memory ports: - - "3306:3306" - volumes: - - volume:/var/lib/mysql - networks: - - network - healthcheck: - test: "/usr/bin/mysql --user=root --password=root --execute \"SHOW DATABASES;\"" - interval: 2s - timeout: 20s - retries: 10 - pma: - image: phpmyadmin/phpmyadmin - container_name: sshmon_pma - restart: always - environment: - - PMA_ARBITRARY=1 - ports: - - "8081:80" - depends_on: - - mysql + - "8000:8000" networks: - network volumes: diff --git a/src/index.ts b/src/index.ts index 3c3b32a..c690c7e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -35,7 +35,7 @@ const getIP = () : Promise => { }); } -const connection = new Surreal("http://127.0.0.1:8000/rpc"); +const connection = new Surreal("http://surrealdb:8000/rpc"); await connection.signin({ user: "root",