feat: added dockerfiles for virtualization

This commit is contained in:
Marcel Haag 2020-10-24 19:45:36 +02:00
parent 70d3ac4d3c
commit 265153b015
6 changed files with 68 additions and 1 deletions

View File

@ -3,3 +3,7 @@
## Project Members ## Project Members
* Daniel Mader * Daniel Mader
* Marcel Haag * Marcel Haag
## Development server
Execute 'c4po.sh' and all services will run on a dev server.

13
c4po.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
baseDir=$(pwd)"/"
echo"
_______ _______ _______ _ _ ______ _____ _______ __ __
|______ |______ | | | |_____/ | | \_/
______| |______ |_____ |_____| | \_ __|__ | | _/_/_/ _/ _/ _/_/_/ _/_/
_/ _/ _/ _/ _/ _/ _/
_/ _/_/_/_/ _/_/_/ _/ _/
_/ _/ _/ _/ _/
_/_/_/ _/ _/ _/_/
"
docker-compose up --build
#docker-compose up

24
docker-compose.yml Normal file
View File

@ -0,0 +1,24 @@
version: '3.1'
services:
api:
build: './security-c4po-api'
image: security-c4po-api:latest
container_name: security-c4po-api
deploy:
resources:
limits:
memory: "1G"
ports:
- '8443:8443'
angular:
build: './security-c4po-angular'
image: security-c4po-angular:latest
container_name: security-c4po-angular
deploy:
resources:
limits:
memory: "1G"
ports:
- '4200:4200'

View File

@ -0,0 +1,19 @@
# base image
FROM node:12.13.1
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package.json /app/package.json
RUN npm install
RUN npm install -g @angular/cli@10.2.0
# add app
COPY . /app
# start app
CMD ng serve --host 0.0.0.0

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>SecurityC4poAngular</title> <title>SecurityC4POAngular</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">

View File

@ -0,0 +1,7 @@
FROM openjdk:11-jre
# COPY PACKAGE INTO IMAGE
COPY ./build/libs/security-c4po-api-0.0.1-SNAPSHOT.jar .
# RUN JAVA
CMD [ "java", "-jar", "security-c4po-api-0.0.1-SNAPSHOT.jar" ]