Skip to content

Commit 6c0f985

Browse files
Merge pull request #1 from Geode-solutions/develop
Develop
2 parents aac2e7b + ce240f4 commit 6c0f985

4 files changed

Lines changed: 89 additions & 0 deletions

File tree

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
README.md
2+
.github

.github/workflows/CD.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docker Image CD
2+
3+
on:
4+
push:
5+
branches: [ master, develop ]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: GithubPackages Login
12+
uses: docker/login-action@v1.10.0
13+
with:
14+
registry: ghcr.io
15+
username: ${{ github.actor }}
16+
password: ${{ secrets.GITHUB_TOKEN }}
17+
- name: Extract metadata (tags, labels) for Docker
18+
id: meta
19+
uses: docker/metadata-action@v3
20+
with:
21+
images: ghcr.io/${{ github.repository }}
22+
- name: Build and push Docker images
23+
uses: docker/build-push-action@v2
24+
with:
25+
context: .
26+
push: true
27+
tags: ${{ steps.meta.outputs.tags }}
28+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM nginx:alpine
2+
COPY nginx.conf /etc/nginx/nginx.conf
3+
4+
RUN \
5+
apk add openssl && \
6+
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/nginx.key -out /etc/nginx/nginx.crt -subj "/C=FR/ST=France/L=Pau/O=Geode-solutions"
7+
8+
9+
EXPOSE 443

nginx.conf

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
events {
2+
worker_connections 1024;
3+
}
4+
5+
http {
6+
# Nginx will handle gzip compression of responses from the app server
7+
gzip on;
8+
gzip_proxied any;
9+
gzip_types text/plain application/json;
10+
gzip_min_length 1000;
11+
12+
server {
13+
listen 443 ssl;
14+
server_name localhost;
15+
16+
ssl_certificate nginx.crt;
17+
ssl_certificate_key nginx.key;
18+
19+
client_max_body_size 0;
20+
21+
location ~ "^/[a-z0-9]{32}/geode/" {
22+
if ($request_method !~ ^(GET|POST|OPTIONS)$) {
23+
return 405;
24+
}
25+
rewrite "^/[a-z0-9]{32}/geode/(.*)" /$1 break;
26+
proxy_pass http://localhost:5000;
27+
proxy_http_version 1.1;
28+
proxy_set_header Host $host;
29+
proxy_set_header X-Real-IP $remote_addr;
30+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31+
proxy_set_header X-Forwarded-Proto $scheme;
32+
}
33+
34+
location ~ "^/[a-z0-9]{32}/viewer/" {
35+
if ($request_method !~ ^(GET|POST|OPTIONS)$) {
36+
return 405;
37+
}
38+
rewrite "^/[a-z0-9]{32}/viewer/(.*)" /$1 break;
39+
proxy_pass http://localhost:1234;
40+
proxy_http_version 1.1;
41+
proxy_set_header Host $host;
42+
proxy_set_header X-Real-IP $remote_addr;
43+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44+
proxy_set_header X-Forwarded-Proto $scheme;
45+
46+
proxy_set_header Connection "keep-alive, Upgrade";
47+
proxy_set_header Upgrade websocket;
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)