Skip to content

Commit 51cbcfe

Browse files
authored
dont use docker build (#9)
1 parent 2c1ff8e commit 51cbcfe

File tree

5 files changed

+86
-56
lines changed

5 files changed

+86
-56
lines changed

.github/workflows/build-pr.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,6 @@ jobs:
2424
steps:
2525
- name: Check out the repo
2626
uses: actions/checkout@v3
27-
- name: Setup node
28-
uses: actions/setup-node@v3
29-
with:
30-
node-version: "14.x"
31-
32-
- name: get excalidraw version
33-
id: excalidraw_version
34-
run: echo "::set-output name=version::$(cat ./APP_VERSION)"
35-
36-
- name: Check out excalidraw
37-
uses: actions/checkout@v3
38-
with:
39-
repository: 'excalidraw/excalidraw'
40-
path: excalidraw
41-
ref: v${{ steps.excalidraw_version.outputs.version }}
42-
43-
- name: install packages
44-
working-directory: excalidraw
45-
run: yarn --ignore-optional
46-
- name: build application
47-
working-directory: excalidraw
48-
run: yarn run build:app:docker
4927

5028
- name: Login to GitHub Container Registry
5129
uses: docker/login-action@v1
@@ -65,6 +43,4 @@ jobs:
6543
with:
6644
context: ./
6745
push: true
68-
build-args: APP_VERSION=${{ steps.excalidraw_version.outputs.version }}
69-
tags: |
70-
${{ env.IMAGE_BASE }}:pr-${{ github.event.pull_request.number }}
46+
tags: ${{ env.IMAGE_BASE }}:pr-${{ github.event.pull_request.number }}

.github/workflows/create-release.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,6 @@ jobs:
2424
steps:
2525
- name: Check out the repo
2626
uses: actions/checkout@v3
27-
- name: Setup node
28-
uses: actions/setup-node@v3
29-
with:
30-
node-version: "14.x"
31-
32-
- name: get excalidraw version
33-
id: excalidraw_version
34-
run: echo "::set-output name=version::$(cat ./APP_VERSION)"
35-
36-
- name: Check out excalidraw
37-
uses: actions/checkout@v3
38-
with:
39-
repository: "excalidraw/excalidraw"
40-
path: excalidraw
41-
ref: v${{ steps.excalidraw_version.outputs.version }}
42-
43-
- name: install packages
44-
working-directory: excalidraw
45-
run: yarn --ignore-optional
46-
- name: build application
47-
working-directory: excalidraw
48-
run: yarn run build:app:docker
4927

5028
- name: Login to GitHub Container Registry
5129
uses: docker/login-action@v1

.nginx/default.conf

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
server {
2+
listen 8080;
3+
server_name localhost;
4+
5+
#access_log /var/log/nginx/host.access.log main;
6+
7+
location / {
8+
root /usr/share/nginx/html;
9+
index index.html index.htm;
10+
}
11+
12+
#error_page 404 /404.html;
13+
14+
# redirect server error pages to the static page /50x.html
15+
#
16+
error_page 500 502 503 504 /50x.html;
17+
location = /50x.html {
18+
root /usr/share/nginx/html;
19+
}
20+
21+
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
22+
#
23+
#location ~ \.php$ {
24+
# proxy_pass http://127.0.0.1;
25+
#}
26+
27+
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
28+
#
29+
#location ~ \.php$ {
30+
# root html;
31+
# fastcgi_pass 127.0.0.1:9000;
32+
# fastcgi_index index.php;
33+
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
34+
# include fastcgi_params;
35+
#}
36+
37+
# deny access to .htaccess files, if Apache's document root
38+
# concurs with nginx's one
39+
#
40+
#location ~ /\.ht {
41+
# deny all;
42+
#}
43+
}

.nginx/nginx.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
worker_processes auto;
2+
3+
error_log /var/log/nginx/error.log notice;
4+
pid /var/run/nginx.pid;
5+
6+
7+
events {
8+
worker_connections 1024;
9+
}
10+
11+
12+
http {
13+
include /etc/nginx/mime.types;
14+
default_type application/octet-stream;
15+
16+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
17+
'$status $body_bytes_sent "$http_referer" '
18+
'"$http_user_agent" "$http_x_forwarded_for"';
19+
20+
access_log /var/log/nginx/access.log main;
21+
22+
sendfile on;
23+
#tcp_nopush on;
24+
25+
keepalive_timeout 65;
26+
27+
#gzip on;
28+
29+
include /etc/nginx/conf.d/*.conf;
30+
}

Dockerfile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
# https://catalog.redhat.com/software/containers/ubi9/nginx-120/61a609f2bfd4a5234d596287
2-
FROM registry.access.redhat.com/ubi9/nginx-120:latest
1+
FROM excalidraw/excalidraw:latest
32

4-
USER root
5-
ARG APP_VERSION
6-
RUN echo -e "Nginx Version: $NGINX_VERSION\nApp Version: $APP_VERSION" > /VERSION
3+
COPY .nginx/nginx.conf /etc/nginx/nginx.conf
4+
COPY .nginx/default.conf /etc/nginx/conf.d/default.conf
75

8-
USER default
6+
## add permissions for nginx user
7+
RUN chown -R nginx:nginx /usr/share/nginx/html && chmod -R 755 /usr/share/nginx/html && \
8+
chown -R nginx:nginx /var/cache/nginx && \
9+
chown -R nginx:nginx /var/log/nginx && \
10+
chown -R nginx:nginx /etc/nginx/conf.d
11+
RUN touch /var/run/nginx.pid && \
12+
chown -R nginx:nginx /var/run/nginx.pid
913

10-
ADD ./excalidraw/build /tmp/src
11-
RUN /usr/libexec/s2i/assemble
14+
USER nginx
1215

13-
CMD cat /VERSION && /usr/libexec/s2i/run
16+
CMD nginx -g 'daemon off;'

0 commit comments

Comments
 (0)