Skip to content

Commit c15bd18

Browse files
Merge pull request #6 from opexdev/dev
Release v1.0.0-beta.1
2 parents 74ce399 + 26f039a commit c15bd18

File tree

6 files changed

+61
-10
lines changed

6 files changed

+61
-10
lines changed

.github/workflows/dev.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ jobs:
1313
- name: Checkout Source Code
1414
uses: actions/checkout@v2
1515
- name: Build Docker images
16-
run: TAG=dev docker-compose build
16+
env:
17+
TAG: dev
18+
EXPOSED_PORT: 8443
19+
run: docker-compose build
1720
- name: Login to GitHub Container Registry
1821
uses: docker/login-action@v1
1922
with:
2023
registry: ghcr.io
2124
username: ${{ github.actor }}
2225
password: ${{ secrets.GITHUB_TOKEN }}
2326
- name: Push images to GitHub Container Registry
24-
run: TAG=dev docker-compose push
27+
env:
28+
TAG: dev
29+
run: docker-compose push

.github/workflows/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ jobs:
1313
- name: Checkout Source Code
1414
uses: actions/checkout@v2
1515
- name: Build Docker images
16-
run: TAG=latest docker-compose build
16+
env:
17+
TAG: latest
18+
EXPOSED_PORT: 443
19+
run: docker-compose build
1720
- name: Login to GitHub Container Registry
1821
uses: docker/login-action@v1
1922
with:
2023
registry: ghcr.io
2124
username: ${{ github.actor }}
2225
password: ${{ secrets.GITHUB_TOKEN }}
2326
- name: Push images to GitHub Container Registry
24-
run: TAG=latest docker-compose push
27+
env:
28+
TAG: latest
29+
run: docker-compose push

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
# Certificate
55
*.pem
66
*.crt
7-
*.der
7+
*.der
8+
9+
# Misc
10+
.env

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
FROM nginx:1.20.2
2-
ADD nginx.conf /etc/nginx/
3-
EXPOSE 443
2+
COPY nginx.conf /etc/nginx/
3+
ARG EXPOSED_PORT=443
4+
ENV EXPOSED_PORT $EXPOSED_PORT
5+
RUN envsubst '\$EXPOSED_PORT' < /etc/nginx/nginx.conf | tee /etc/nginx/nginx.conf
6+
EXPOSE 443

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ version: '3.8'
22
services:
33
nginx:
44
image: ghcr.io/opexdev/nginx:$TAG
5-
build: .
5+
build:
6+
context: .
7+
args:
8+
- EXPOSED_PORT=$EXPOSED_PORT

nginx.conf

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ http {
5050
server web-app:80;
5151
}
5252

53+
upstream docker-admin-panel {
54+
server admin-panel:80;
55+
}
56+
5357
upstream docker-ipg {
5458
server payment:8080;
5559
}
@@ -72,13 +76,42 @@ http {
7276
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
7377
proxy_set_header X-Forwarded-Proto $scheme;
7478
proxy_set_header X-Forwarded-Host $server_name;
79+
proxy_set_header X-Forwarded-Port $EXPOSED_PORT;
80+
81+
server {
82+
listen 443 ssl;
83+
listen [::]:443 ssl;
84+
85+
server_name dashbrd-demo.opex.dev;
86+
87+
location / {
88+
resolver 127.0.0.11;
89+
set $backend http://superset:8088;
90+
proxy_pass $backend;
91+
}
92+
}
93+
94+
server {
95+
listen 443 ssl;
96+
listen [::]:443 ssl;
97+
98+
server_name adm-demo.opex.dev;
99+
100+
location ~* \.(.*)$ {
101+
proxy_pass http://docker-admin-panel;
102+
}
103+
104+
location / {
105+
proxy_pass http://docker-admin-panel;
106+
rewrite .* / break;
107+
}
108+
}
75109

76110
server {
77111
listen 443 ssl;
78112
listen [::]:443 ssl;
79113

80114
server_name demo.opex.dev;
81-
server_name demo.opex.dev:8443;
82115

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

101134
server_name api.opex.dev;
102-
server_name api.opex.dev:8443;
103135

104136
limit_req zone=default burst=5 nodelay;
105137

0 commit comments

Comments
 (0)