diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e7227c5bd..3ce18ec7f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,23 +1,7 @@ version: '3' services: - traefik: - image: traefik:v2.6 - command: - - --log.level=INFO - - --api.insecure=true - - --entrypoints.web.address=:80 - - --providers.docker - volumes: - - /var/run/docker.sock:/var/run/docker.sock - labels: - traefik.http.routers.dash.rule: Host(`dash.localhost`) - traefik.http.routers.dash.service: api@internal - ports: - - "80:80" - depends_on: - - app - app: + teledrive: command: node server/dist/index.js labels: traefik.http.routers.server.rule: Host(`teledrive.localhost`) @@ -37,10 +21,12 @@ services: DB_HOST: db DB_USERNAME: postgres DB_PASSWORD: ${DB_PASSWORD} + REDIS_URI: redis://redis:6379 env_file: - .env depends_on: - db + db: image: postgres:13 restart: always @@ -49,4 +35,12 @@ services: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_DB: teledrive volumes: - - ../server/src/model/migrations/dump.sql:/docker-entrypoint-initdb.d/dump.sql \ No newline at end of file + - teledrive_data:/var/lib/postgresql/data + - ../server/src/model/migrations/dump.sql:/docker-entrypoint-initdb.d/dump.sql + + redis: + image: redis:6 + restart: always + +volumes: + teledrive_data: \ No newline at end of file diff --git a/docs/docs/Installation/docker.md b/docs/docs/Installation/docker.md index 6928d8b92..45533f0bd 100644 --- a/docs/docs/Installation/docker.md +++ b/docs/docs/Installation/docker.md @@ -39,13 +39,13 @@ cd docker docker-compose up -d ``` -Done! You can now open [teledrive.localhost](http://teledrive.localhost) or [localhost:4000](http://localhost:4000) in your browser 🎊 +Done! You can now open [localhost:4000](http://localhost:4000) in your browser 🎊 View the app logs with this command: ```shell cd docker -docker-compose logs app --follow +docker-compose logs teledrive --follow ``` **Note.** *You need to set `ENV=develop` in the variables to logging all events.* @@ -66,7 +66,9 @@ Upgrade to the latest version of TeleDrive with this command: git pull origin main # or, staging for the latest updates cd docker -docker-compose up -d --build app +docker-compose down +docker-compose build teledrive +docker-compose up -d ``` ## Common Issues diff --git a/package.json b/package.json index 64341a8d4..745f69cda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teledrive", - "version": "2.0.4", + "version": "2.0.5", "repository": "git@github.com:mgilangjanuar/teledrive.git", "author": "M Gilang Januar ", "license": "MIT", diff --git a/server/package.json b/server/package.json index 26f425407..d9bd61a83 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "2.0.4", + "version": "2.0.5", "main": "dist/index.js", "license": "MIT", "private": true, diff --git a/server/src/service/Cache.ts b/server/src/service/Cache.ts index e4df08ee5..a51f8ccf0 100644 --- a/server/src/service/Cache.ts +++ b/server/src/service/Cache.ts @@ -12,6 +12,9 @@ export class Redis { if (!this.client) { this.client = new Redis() } + this.client.redis?.on('connect', () => console.log('redis: connected')) + this.client.redis?.on('ready', () => console.log('redis: ready')) + this.client.redis?.on('error', console.error) return this.client } diff --git a/web/package.json b/web/package.json index f5146912c..e6620ba4e 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "2.0.4", + "version": "2.0.5", "private": true, "dependencies": { "@ideasio/add-to-homescreen-react": "^1.0.10", diff --git a/web/src/utils/Constant.ts b/web/src/utils/Constant.ts index 7e22cab7d..f8f305e36 100644 --- a/web/src/utils/Constant.ts +++ b/web/src/utils/Constant.ts @@ -1,4 +1,4 @@ -export const VERSION = '2.0.4' +export const VERSION = '2.0.5' export const MAX_UPLOAD_SIZE = 2_000_000_000 export const CHUNK_SIZE = 512 * 1024 export const RETRY_COUNT = 50 \ No newline at end of file