Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
name: Deploy OPEX-Nginx - Dev
name: Push images on dev branch update

on:
push:
branches:
- dev

jobs:
jenkinsJob:
name: Build OPEX-Nginx new dev version
runs-on: ubuntu-latest
build:
runs-on: ubuntu-20.04
name: Build NGINX
steps:
- name: Trigger opex-nginx-dev on jenkins
uses: appleboy/jenkins-action@master
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Build Docker images
run: TAG=dev docker-compose build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
url: ${{ secrets.JENKINS_URL }}
user: ${{ secrets.JENKINS_USER }}
token: ${{ secrets.JENKINS_TOKEN }}
job: "opex-nginx-dev"
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: TAG=dev docker-compose push
27 changes: 17 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
name: Deploy OPEX-Nginx - Demo
name: Push images on main branch update

on:
push:
branches:
- main

jobs:
jenkinsJob:
name: Deploy OPEX-Nginx new demo version
runs-on: ubuntu-latest
build:
runs-on: ubuntu-20.04
name: Build NGINX
steps:
- name: Trigger opex-nginx-demo on jenkins
uses: appleboy/jenkins-action@master
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Build Docker images
run: TAG=latest docker-compose build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
url: ${{ secrets.JENKINS_URL }}
user: ${{ secrets.JENKINS_USER }}
token: ${{ secrets.JENKINS_TOKEN }}
job: "opex-nginx-demo"
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
run: TAG=latest docker-compose push
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
FROM nginx:1.20.2
ADD nginx.conf opex.dev.crt private.pem /etc/nginx/
ADD nginx.conf /etc/nginx/
EXPOSE 443
55 changes: 0 additions & 55 deletions Jenkinsfile

This file was deleted.

55 changes: 0 additions & 55 deletions dev.Jenkinsfile

This file was deleted.

5 changes: 0 additions & 5 deletions docker-compose.dev.yml

This file was deleted.

5 changes: 0 additions & 5 deletions docker-compose.override.yml

This file was deleted.

15 changes: 1 addition & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
version: '3.8'
services:
nginx:
image: ghcr.io/opexdev/nginx:$TAG
build: .
volumes:
- www:/data/www
networks:
- default
deploy:
restart_policy:
condition: on-failure
volumes:
www:
external: false
networks:
default:
driver: bridge
name: ${DEFAULT_NETWORK_NAME:-opex}
7 changes: 4 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ http {
ssl_session_timeout 10m;
keepalive_timeout 70;

ssl_certificate opex.dev.crt;
ssl_certificate_key private.pem;
ssl_certificate /run/secrets/opex_dev_crt;
ssl_certificate_key /run/secrets/private_pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;

Expand Down Expand Up @@ -47,7 +47,7 @@ http {
}

upstream docker-web-app {
server app:80;
server web-app:80;
}

upstream docker-ipg {
Expand All @@ -70,6 +70,7 @@ http {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
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;

server {
Expand Down