Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Manna Mahmud committed Apr 24, 2021
0 parents commit d8930db
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backends/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kareegar.trainings</groupId>
<artifactId>mmfb</artifactId>
<version>0.0.1.SNAPSHOT</version>
</parent>
<artifactId>backends</artifactId>
<packaging>pom</packaging>
<name>Backends</name>
</project>
70 changes: 70 additions & 0 deletions edge/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: "3.3"

volumes:
postgres_data:
driver: local
services:
traefik:
image: "traefik:v2.4"
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.file=true"
- "--providers.docker=true"
- "--providers.file.watch=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entryPoints.web.forwardedHeaders.insecure"
- "--entrypoints.websecure.address=:443"
- "--entryPoints.websecure.forwardedHeaders.insecure"
- "--entryPoints.web.forwardedHeaders.trustedIPs=127.0.0.1/32"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--certificatesresolvers.le.acme.tlschallenge=true"
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "[email protected]"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
ports:
- "443:443"
- "80:80"
- "28080:8080"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: quay.io/keycloak/keycloak:latest
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "ssl=true"
labels:
traefik.enable: "true"
traefik.http.routers.auth.rule: Host(`mmfb.com`) && PathPrefix(`/auth`)
traefik.http.routers.auth.entrypoints: websecure
traefik.http.middlewares.a.headers.framedeny: "false"
traefik.http.middlewares.a.headers.sslredirect: "true"
traefik.http.middlewares.a.headers.contentsecuritypolicy: upgrade-insecure-requests
traefik.http.middlewares.authheader.headers.sslproxyheaders.x-forwarded-proto: https
traefik.http.routers.auth.tls.certresolver: le
ports:
- 8080:8080
depends_on:
- postgres
15 changes: 15 additions & 0 deletions edge/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kareegar.trainings</groupId>
<artifactId>mmfb</artifactId>
<version>0.0.1.SNAPSHOT</version>
</parent>
<artifactId>edge</artifactId>
<packaging>pom</packaging>
<name>EDGE</name>
<description>Reverse Proxy, Auth Dockers</description>
</project>
14 changes: 14 additions & 0 deletions frontends/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kareegar.trainings</groupId>
<artifactId>mmfb</artifactId>
<version>0.0.1.SNAPSHOT</version>
</parent>
<artifactId>frontends</artifactId>
<packaging>pom</packaging>
<name>Frontends</name>
</project>
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kareegar.trainings</groupId>
<artifactId>mmfb</artifactId>
<version>0.0.1.SNAPSHOT</version>
<packaging>pom</packaging>
<name>MMFB</name>
<description>Multi Micro Frontends and Backends</description>

<modules>
<module>edge</module>
<module>frontends</module>
<module>backends</module>
</modules>

</project>

0 comments on commit d8930db

Please sign in to comment.