Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,42 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.26.0</version>
<extensions>true</extensions>
<configuration>
<verbose>true</verbose>
<images>
<image>
<name>hk-backend</name>
<build>
<from>java:8-jdk-alpine</from>
<entryPoint>
<exec>
<args>java</args>
<args>-jar</args>
<args>/maven/${project.artifactId}-${project.version}.jar</args>
</exec>
</entryPoint>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build</id>
<phase>post-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# My Local Environment

server.port=8000
server.port=${SERVER_PORT:8100}


# DataSource Configuration
spring.datasource.url=jdbc:postgresql://localhost:5432/issuemanagment
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.url=jdbc:postgresql://hk-pg-server:5432/issuemanagment
spring.datasource.username=${DB_USERNAME:postgres}
spring.datasource.password=${DB_PASS:postgres}
spring.jpa.show-sql=true

#CodeFirst, DbFirst
Expand Down
36 changes: 36 additions & 0 deletions src/main/resources/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3.1'

networks:
haydikodlayalim:

services:
db:
image: postgres
container_name: hk-pg-server
hostname: hk-pg-server
networks:
- haydikodlayalim
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: postgres

backend:
image: hk-backend
container_name: hk-backend-server
hostname: hk-backend-server
ports:
- '8100:8100'
restart: always
networks:
- haydikodlayalim

frontend:
image: hk-frontend
container_name: hk-frontend-server
hostname: hk-frontend-server
ports:
- '8200:80'
restart: always
networks:
- haydikodlayalim
15 changes: 15 additions & 0 deletions src/webui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# BUILD STAGE
FROM node as node

WORKDIR /issuemanagement

COPY . .

RUN npm install
RUN npm install -s node-sass
RUN npm run build


# DEPLOYMENT STAGE
FROM nginx
COPY --from=node /issuemanagement/dist /usr/share/nginx/html
2 changes: 1 addition & 1 deletion src/webui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "../../public",
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down
1 change: 1 addition & 0 deletions src/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"ngx-bootstrap": "^3.0.0",
"ngx-loading": "^3.0.1",
"ngx-toastr": "^9.1.1",
"node-sass": "^4.14.0",
"popper.js": "^1.14.3",
"rxjs": "^6.2.1",
"rxjs-compat": "^6.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/webui/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

export const environment = {
production: false,
API_BASE_PATH:"http://localhost:8000/api"
API_BASE_PATH:"http://localhost:8100/api"
};

/*
Expand Down