From 6a183a6263c58d9e80cfb27cc53434a7d21df50a Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 24 Feb 2022 12:59:45 +0100 Subject: [PATCH] docker volumes #232 --- docker-compose.yaml | 28 +++++++++++++++++++--------- docker/Dockerfile | 1 + docker/Dockerfile-alpine | 1 + 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index adebd53f..605e2eb6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,16 +3,26 @@ version: "3" services: dbgate: - # build: docker - image: dbgate/dbgate:beta + build: docker + # image: dbgate/dbgate:beta restart: always ports: - 3100:3000 - volumes: - - /home/jena/test/chinook:/mnt/sqt - environment: - CONNECTIONS: sqlite + # volumes: + # - /home/jena/dbgate-data:/root/dbgate-data - LABEL_sqlite: sqt - FILE_sqlite: /mnt/sqt/Chinook.db - ENGINE_sqlite: sqlite@dbgate-plugin-sqlite + volumes: + - dbgate-data:/root/dbgate-data + + # volumes: + # - /home/jena/test/chinook:/mnt/sqt + # environment: + # CONNECTIONS: sqlite + + # LABEL_sqlite: sqt + # FILE_sqlite: /mnt/sqt/Chinook.db + # ENGINE_sqlite: sqlite@dbgate-plugin-sqlite + +volumes: + dbgate-data: + driver: local \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index a901f936..06958d68 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,4 +6,5 @@ COPY . . WORKDIR /home/dbgate-docker EXPOSE 3000 +VOLUME /root/dbgate-data CMD node bundle.js diff --git a/docker/Dockerfile-alpine b/docker/Dockerfile-alpine index 59344f14..fdbae926 100644 --- a/docker/Dockerfile-alpine +++ b/docker/Dockerfile-alpine @@ -6,4 +6,5 @@ COPY . . WORKDIR /home/dbgate-docker EXPOSE 3000 +VOLUME /root/dbgate-data CMD node bundle.js