Skip to content

Commit

Permalink
Merge pull request #4 from JacekKaczmarek10/feat/update_docker
Browse files Browse the repository at this point in the history
feat: update docker variables
  • Loading branch information
JacekKaczmarek10 authored Jun 8, 2024
2 parents c9e10c8 + f106891 commit 2ad3864
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
password: ${{ secrets.VPS_PASSWORD }}
script: |
cd /srv/Server-Monitoring-Tool &&
sudo ./update.sh
sudo ./update2.sh
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
FROM maven:3.9.6-amazoncorretto-21 AS build

ARG DB_URL
ARG DB_USERNAME
ARG DB_PASSWORD

ENV DB_URL=$DB_URL
ENV DB_USERNAME=$DB_USERNAME
ENV DB_PASSWORD=$DB_PASSWORD

WORKDIR /build
COPY . .
RUN mvn clean install -Dmaven.test.skip=true
RUN mvn clean install

FROM openjdk:21
COPY --from=build /build/target/DockerMonitor-0.0.1-SNAPSHOT.jar /usr/local/lib/DockerMonitor-0.0.1-SNAPSHOT.jar
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
version: '3.8'

services:
servermonitor-backend:
image: servermonitor-backend:latest
build:
context: .
dockerfile: ./Dockerfile
args:
DB_URL: ${DB_URL}
DB_USERNAME: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
environment:
- DB_URL=${DB_URL}
- DB_USERNAME=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
container_name: servermonitor-backend
ports:
- "8052:8052"
Expand Down
1 change: 0 additions & 1 deletion update.sh

This file was deleted.

0 comments on commit 2ad3864

Please sign in to comment.