commit
438d75f067
34
.github/workflows/build-nginx-drawio.yml
vendored
Normal file
34
.github/workflows/build-nginx-drawio.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Build nginx with Draw.io Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: docker/nginx-drawio/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: jmal/nginx-drawio:latest
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
13
docker/nginx-drawio/Dockerfile
Normal file
13
docker/nginx-drawio/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM nginx:latest
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y unzip wget
|
||||||
|
|
||||||
|
RUN wget https://github.com/jgraph/drawio/releases/download/v24.4.10/draw.war -O /var/www/draw.war
|
||||||
|
|
||||||
|
RUN unzip /var/www/draw.war -d /var/www/draw
|
||||||
|
|
||||||
|
RUN rm -rf /var/www/draw.war /var/www/draw/META-INF /var/www/draw/WEB-INF
|
||||||
|
|
||||||
|
RUN mkdir -p /etc/nginx/servers
|
||||||
|
|
||||||
|
COPY docker/nginx-drawio/drawio.conf /etc/nginx/servers/drawio.conf
|
||||||
10
docker/nginx-drawio/drawio.conf
Normal file
10
docker/nginx-drawio/drawio.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name localhost;
|
||||||
|
root /var/www/draw;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user