Dev #4
+1
-11
@@ -26,19 +26,9 @@ WORKDIR /app
|
|||||||
# Copy the compiled executable from builder
|
# Copy the compiled executable from builder
|
||||||
COPY --from=builder /app/bin/server.exe ./bin/server.exe
|
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/
|
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
|
EXPOSE 9090
|
||||||
|
|
||||||
CMD ["./bin/server.exe"]
|
CMD ["./bin/server.exe"]
|
||||||
|
|||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
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 --no-cache -t geotracker ."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -60,6 +60,7 @@ class AuthRoutes {
|
|||||||
Future<Response> _register(Request request) async {
|
Future<Response> _register(Request request) async {
|
||||||
final stopwatch = Stopwatch()..start();
|
final stopwatch = Stopwatch()..start();
|
||||||
final body = await request.readAsString();
|
final body = await request.readAsString();
|
||||||
|
logRequest(method: 'POST', url: '/reg', status: 444, duration: stopwatch.elapsed, body: body);
|
||||||
final data = jsonDecode(body);
|
final data = jsonDecode(body);
|
||||||
|
|
||||||
final login = data['login'];
|
final login = data['login'];
|
||||||
|
|||||||
+22
-4
@@ -7,17 +7,35 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
- ./data:/var/lib/postgresql/data
|
||||||
|
|
||||||
app:
|
app:
|
||||||
build: .
|
image: geotracker
|
||||||
container_name: family_safety_app
|
container_name: family_safety_app
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "9090:9090"
|
- "127.0.0.1:9090:9090"
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
- db
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
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
|
||||||
Reference in New Issue
Block a user