From 298e3d2375dc087c79156eb2a0c3df57069597cc Mon Sep 17 00:00:00 2001 From: rezidir Date: Mon, 22 Jun 2026 14:10:14 +0300 Subject: [PATCH 01/14] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20Jenkinsfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e69de29 From 9193ce1d669e27693b62b515998c506bf0fc14a2 Mon Sep 17 00:00:00 2001 From: rezidir Date: Mon, 22 Jun 2026 14:11:07 +0300 Subject: [PATCH 02/14] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da4239a..369c018 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ WORKDIR /app COPY --from=builder /app/bin/server.exe ./bin/server.exe # Copy the built Flutter web app -COPY web/ ./web/ +#COPY web/ ./web/ # Set environment variables ENV PORT=9090 From 37ba75ecc537677ce4d3ebf0a4113588763e1adf Mon Sep 17 00:00:00 2001 From: rezidir Date: Mon, 22 Jun 2026 14:12:28 +0300 Subject: [PATCH 03/14] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 369c018..8453310 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,16 +29,6 @@ COPY --from=builder /app/bin/server.exe ./bin/server.exe # Copy the built Flutter web app #COPY web/ ./web/ -# Set environment variables -ENV PORT=9090 -ENV POSTGRES_HOST=localhost -ENV POSTGRES_PORT=5432 -ENV POSTGRES_DB=family_safety -ENV POSTGRES_USER=postgres -ENV POSTGRES_PASSWORD=postgres -ENV JWT_SECRET=your-super-secret-key-change-me -ENV TOKEN_LIFETIME=600 - EXPOSE 9090 CMD ["./bin/server.exe"] From 2ce06bba79cef76c02a851bd521af909aa85274e Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 14:19:34 +0300 Subject: [PATCH 04/14] - add Jenkinsfile --- Jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index e69de29..f125872 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent any + + options { + buildDiscarder(logRotator(numToKeepStr: '10')) + disableConcurrentBuilds() + timeout(time: 1, unit: 'MINUTES') + timestamps() + } + + + + stages { + stage('Docker build') { + steps { + echo 'Docker build' + sh "docker build -t rezid/geotracker" + } + } + } + } \ No newline at end of file From 76fdd3601c5a3badfb4354566ee2d217487e689d Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 19:33:14 +0300 Subject: [PATCH 05/14] - fix Jenkinsfile --- Jenkinsfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f125872..14e7249 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,14 +8,13 @@ pipeline { timestamps() } - - stages { - stage('Docker build') { - steps { - echo 'Docker build' - sh "docker build -t rezid/geotracker" - } + stage('Docker build') { + steps { + echo 'Docker build' + sh "docker build --no-cache -t geotracker ." } } - } \ No newline at end of file + } + +} From 3f92cefa9b103c239997945c94222a7701a3b259 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 19:59:32 +0300 Subject: [PATCH 06/14] - fix docker-compose.yml --- docker-compose.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f8de694..8011a24 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,12 +11,6 @@ services: POSTGRES_DB: family_safety volumes: - postgres_data:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 5s - timeout: 5s - retries: 5 - start_period: 10s app: build: . @@ -24,9 +18,6 @@ services: restart: unless-stopped ports: - "9090:9090" - depends_on: - db: - condition: service_healthy volumes: From c7d2e0f11225c7177bf6e075cbcec2ed0de48059 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 20:00:25 +0300 Subject: [PATCH 07/14] - fix docker-compose.yml --- docker-compose.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8011a24..9dcdeb2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,15 +10,35 @@ services: POSTGRES_PASSWORD: postgres POSTGRES_DB: family_safety volumes: - - postgres_data:/var/lib/postgresql/data + - ./data:/var/lib/postgresql/data app: - build: . + image: geotracker container_name: family_safety_app restart: unless-stopped ports: - - "9090:9090" + - "127.0.0.1:9090:9090" + depends_on: + - db volumes: postgres_data: + + +#services: +# db: +# image: postgres:16-alpine +# container_name: family_safety_db +# restart: unless-stopped +# volumes: +# - ./data:/var/lib/postgresql/data +# +# app: +# image: geotracker +# container_name: family_safety_app +# restart: unless-stopped +# ports: +# - "127.0.0.1:9090:9090" +# depends_on: +# - db \ No newline at end of file From ae32995f1162e93e74e89f34ba199af64ef71d4a Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 20:33:40 +0300 Subject: [PATCH 08/14] - fix docker-compose.yml --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8453310..609aaad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,8 @@ WORKDIR /app # Copy the compiled executable from builder COPY --from=builder /app/bin/server.exe ./bin/server.exe -# Copy the built Flutter web app -#COPY web/ ./web/ + Copy the built Flutter web app +COPY web/ ./web/ EXPOSE 9090 From c5995bb0e957d9198d3389c8fe4cb41c69cade0b Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 20:35:48 +0300 Subject: [PATCH 09/14] - fix Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 609aaad..b379b45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ WORKDIR /app # Copy the compiled executable from builder COPY --from=builder /app/bin/server.exe ./bin/server.exe - Copy the built Flutter web app +Copy the built Flutter web app COPY web/ ./web/ EXPOSE 9090 From a1b36577dac0ca224b887fd9ac4c8d06ed18ce1f Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 20:36:39 +0300 Subject: [PATCH 10/14] - fix Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b379b45..310cbe3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ WORKDIR /app # Copy the compiled executable from builder COPY --from=builder /app/bin/server.exe ./bin/server.exe -Copy the built Flutter web app +#Copy the built Flutter web app COPY web/ ./web/ EXPOSE 9090 From 5e9624bc8d8711d3ef6e6b4872dc6ad201214ea5 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 21:10:49 +0300 Subject: [PATCH 11/14] - fix auth --- bin/routes/auth_routes.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/routes/auth_routes.dart b/bin/routes/auth_routes.dart index 75bc217..6321af2 100644 --- a/bin/routes/auth_routes.dart +++ b/bin/routes/auth_routes.dart @@ -68,7 +68,7 @@ class AuthRoutes { await database.createUser(login, password); await database.createLog(login, 'User registration'); stopwatch.stop(); - final response = Response(201, body: jsonEncode({'message': 'User registered'}), headers: {'Content-Type': 'application/json'}); + final response = Response(200, body: jsonEncode({'message': 'User registered'}), headers: {'Content-Type': 'application/json'}); logRequest(method: 'POST', url: '/reg', status: 201, duration: stopwatch.elapsed, body: body, responseHeaders: response.headers); return response; } From 1e4200832f16fc33d5baca1d0b1adf959fc43b6a Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 21:14:47 +0300 Subject: [PATCH 12/14] - fix auth --- bin/routes/auth_routes.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/routes/auth_routes.dart b/bin/routes/auth_routes.dart index 6321af2..75bc217 100644 --- a/bin/routes/auth_routes.dart +++ b/bin/routes/auth_routes.dart @@ -68,7 +68,7 @@ class AuthRoutes { await database.createUser(login, password); await database.createLog(login, 'User registration'); stopwatch.stop(); - final response = Response(200, body: jsonEncode({'message': 'User registered'}), headers: {'Content-Type': 'application/json'}); + final response = Response(201, body: jsonEncode({'message': 'User registered'}), headers: {'Content-Type': 'application/json'}); logRequest(method: 'POST', url: '/reg', status: 201, duration: stopwatch.elapsed, body: body, responseHeaders: response.headers); return response; } From 2a3a6edc33d4f8b93ae8cd752d4d3dfdc317df91 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 22:02:07 +0300 Subject: [PATCH 13/14] - add log before --- bin/routes/auth_routes.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/routes/auth_routes.dart b/bin/routes/auth_routes.dart index 75bc217..46827b9 100644 --- a/bin/routes/auth_routes.dart +++ b/bin/routes/auth_routes.dart @@ -60,6 +60,7 @@ class AuthRoutes { Future _register(Request request) async { final stopwatch = Stopwatch()..start(); final body = await request.readAsString(); + logRequest(method: 'POST', url: '/reg', status: 400, duration: stopwatch.elapsed, body: body); final data = jsonDecode(body); final login = data['login']; From 417bb7834e29599088223cb78f5ecc6a492b5105 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Mon, 22 Jun 2026 22:03:44 +0300 Subject: [PATCH 14/14] - add log before --- bin/routes/auth_routes.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/routes/auth_routes.dart b/bin/routes/auth_routes.dart index 46827b9..55ec773 100644 --- a/bin/routes/auth_routes.dart +++ b/bin/routes/auth_routes.dart @@ -60,7 +60,7 @@ class AuthRoutes { Future _register(Request request) async { final stopwatch = Stopwatch()..start(); final body = await request.readAsString(); - logRequest(method: 'POST', url: '/reg', status: 400, duration: stopwatch.elapsed, body: body); + logRequest(method: 'POST', url: '/reg', status: 444, duration: stopwatch.elapsed, body: body); final data = jsonDecode(body); final login = data['login'];