Skip to content

Commit 74ce399

Browse files
Merge pull request #5 from opexdev/dev
Release v1.0.0-beta.1
2 parents c75b45a + 2b36daf commit 74ce399

File tree

9 files changed

+41
-158
lines changed

9 files changed

+41
-158
lines changed

.github/workflows/dev.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
name: Deploy OPEX-Nginx - Dev
1+
name: Push images on dev branch update
2+
23
on:
34
push:
45
branches:
56
- dev
7+
68
jobs:
7-
jenkinsJob:
8-
name: Build OPEX-Nginx new dev version
9-
runs-on: ubuntu-latest
9+
build:
10+
runs-on: ubuntu-20.04
11+
name: Build NGINX
1012
steps:
11-
- name: Trigger opex-nginx-dev on jenkins
12-
uses: appleboy/jenkins-action@master
13+
- name: Checkout Source Code
14+
uses: actions/checkout@v2
15+
- name: Build Docker images
16+
run: TAG=dev docker-compose build
17+
- name: Login to GitHub Container Registry
18+
uses: docker/login-action@v1
1319
with:
14-
url: ${{ secrets.JENKINS_URL }}
15-
user: ${{ secrets.JENKINS_USER }}
16-
token: ${{ secrets.JENKINS_TOKEN }}
17-
job: "opex-nginx-dev"
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
23+
- name: Push images to GitHub Container Registry
24+
run: TAG=dev docker-compose push

.github/workflows/main.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
name: Deploy OPEX-Nginx - Demo
1+
name: Push images on main branch update
2+
23
on:
34
push:
45
branches:
56
- main
7+
68
jobs:
7-
jenkinsJob:
8-
name: Deploy OPEX-Nginx new demo version
9-
runs-on: ubuntu-latest
9+
build:
10+
runs-on: ubuntu-20.04
11+
name: Build NGINX
1012
steps:
11-
- name: Trigger opex-nginx-demo on jenkins
12-
uses: appleboy/jenkins-action@master
13+
- name: Checkout Source Code
14+
uses: actions/checkout@v2
15+
- name: Build Docker images
16+
run: TAG=latest docker-compose build
17+
- name: Login to GitHub Container Registry
18+
uses: docker/login-action@v1
1319
with:
14-
url: ${{ secrets.JENKINS_URL }}
15-
user: ${{ secrets.JENKINS_USER }}
16-
token: ${{ secrets.JENKINS_TOKEN }}
17-
job: "opex-nginx-demo"
20+
registry: ghcr.io
21+
username: ${{ github.actor }}
22+
password: ${{ secrets.GITHUB_TOKEN }}
23+
- name: Push images to GitHub Container Registry
24+
run: TAG=latest docker-compose push

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
FROM nginx:1.20.2
2-
ADD nginx.conf opex.dev.crt private.pem /etc/nginx/
2+
ADD nginx.conf /etc/nginx/
3+
EXPOSE 443

Jenkinsfile

Lines changed: 0 additions & 55 deletions
This file was deleted.

dev.Jenkinsfile

Lines changed: 0 additions & 55 deletions
This file was deleted.

docker-compose.dev.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker-compose.override.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker-compose.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
version: '3.8'
22
services:
33
nginx:
4+
image: ghcr.io/opexdev/nginx:$TAG
45
build: .
5-
volumes:
6-
- www:/data/www
7-
networks:
8-
- default
9-
deploy:
10-
restart_policy:
11-
condition: on-failure
12-
volumes:
13-
www:
14-
external: false
15-
networks:
16-
default:
17-
driver: bridge
18-
name: ${DEFAULT_NETWORK_NAME:-opex}

nginx.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ http {
1313
ssl_session_timeout 10m;
1414
keepalive_timeout 70;
1515

16-
ssl_certificate opex.dev.crt;
17-
ssl_certificate_key private.pem;
16+
ssl_certificate /run/secrets/opex_dev_crt;
17+
ssl_certificate_key /run/secrets/private_pem;
1818
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
1919
ssl_ciphers HIGH:!aNULL:!MD5;
2020

@@ -47,7 +47,7 @@ http {
4747
}
4848

4949
upstream docker-web-app {
50-
server app:80;
50+
server web-app:80;
5151
}
5252

5353
upstream docker-ipg {
@@ -70,6 +70,7 @@ http {
7070
proxy_set_header Host $host;
7171
proxy_set_header X-Real-IP $remote_addr;
7272
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
73+
proxy_set_header X-Forwarded-Proto $scheme;
7374
proxy_set_header X-Forwarded-Host $server_name;
7475

7576
server {

0 commit comments

Comments
 (0)