Skip to content

Commit

Permalink
Merge pull request #6 from opexdev/dev
Browse files Browse the repository at this point in the history
Release v1.0.0-beta.1
  • Loading branch information
ebrahimmfadae authored May 21, 2022
2 parents 74ce399 + 26f039a commit c15bd18
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Build Docker images
run: TAG=dev docker-compose build
env:
TAG: dev
EXPOSED_PORT: 8443
run: docker-compose build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: TAG=dev docker-compose push
env:
TAG: dev
run: docker-compose push
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ jobs:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Build Docker images
run: TAG=latest docker-compose build
env:
TAG: latest
EXPOSED_PORT: 443
run: docker-compose build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: TAG=latest docker-compose push
env:
TAG: latest
run: docker-compose push
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
# Certificate
*.pem
*.crt
*.der
*.der

# Misc
.env
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
FROM nginx:1.20.2
ADD nginx.conf /etc/nginx/
EXPOSE 443
COPY nginx.conf /etc/nginx/
ARG EXPOSED_PORT=443
ENV EXPOSED_PORT $EXPOSED_PORT
RUN envsubst '\$EXPOSED_PORT' < /etc/nginx/nginx.conf | tee /etc/nginx/nginx.conf
EXPOSE 443
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ version: '3.8'
services:
nginx:
image: ghcr.io/opexdev/nginx:$TAG
build: .
build:
context: .
args:
- EXPOSED_PORT=$EXPOSED_PORT
36 changes: 34 additions & 2 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ http {
server web-app:80;
}

upstream docker-admin-panel {
server admin-panel:80;
}

upstream docker-ipg {
server payment:8080;
}
Expand All @@ -72,13 +76,42 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Port $EXPOSED_PORT;

server {
listen 443 ssl;
listen [::]:443 ssl;

server_name dashbrd-demo.opex.dev;

location / {
resolver 127.0.0.11;
set $backend http://superset:8088;
proxy_pass $backend;
}
}

server {
listen 443 ssl;
listen [::]:443 ssl;

server_name adm-demo.opex.dev;

location ~* \.(.*)$ {
proxy_pass http://docker-admin-panel;
}

location / {
proxy_pass http://docker-admin-panel;
rewrite .* / break;
}
}

server {
listen 443 ssl;
listen [::]:443 ssl;

server_name demo.opex.dev;
server_name demo.opex.dev:8443;

location ^~ /auth {
proxy_pass http://docker-auth;
Expand All @@ -99,7 +132,6 @@ http {
listen [::]:443 ssl;

server_name api.opex.dev;
server_name api.opex.dev:8443;

limit_req zone=default burst=5 nodelay;

Expand Down

0 comments on commit c15bd18

Please sign in to comment.