Skip to content

Commit 0de24c4

Browse files
committed
fix: docker build process
1 parent a378cce commit 0de24c4

7 files changed

Lines changed: 61 additions & 14 deletions

File tree

.dockerignore

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

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: redhat-actions/buildah-build@v2
4747
with:
4848
containerfiles: |
49-
./Containerfile
49+
./infra/Containerfile
5050
image: ${{github.event.repository.full_name}}
5151
tags: nightly ${{ github.sha }}
5252
oci: true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: redhat-actions/buildah-build@v2
4747
with:
4848
containerfiles: |
49-
./Containerfile
49+
./infra/Containerfile
5050
image: ${{github.event.repository.full_name}}
5151
tags: latest ${{ github.sha }}
5252
oci: true

Containerfile

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

infra/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
../dist/build.tar
2+
../dist/output

infra/Containerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM nginx:1.27-alpine
2+
3+
RUN rm -r /usr/share/nginx/html \
4+
&& mkdir -p /usr/share/nginx/html \
5+
&& mkdir -p /etc/nginx/conf.d
6+
7+
WORKDIR /usr/share/nginx/html
8+
9+
ADD dist .
10+
11+
COPY ./infra/default.conf /etc/nginx/conf.d/default.conf
12+
13+
EXPOSE 8080
14+
15+
CMD ["nginx", "-g", "daemon off;"]

infra/default.conf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
server {
2+
listen 8080;
3+
server_name localhost;
4+
5+
root /usr/share/nginx/html;
6+
index index.html index.htm;
7+
8+
location / {
9+
try_files $uri $uri/ =404;
10+
}
11+
12+
error_page 500 502 503 504 /50x.html;
13+
location = /50x.html {
14+
internal;
15+
}
16+
17+
location ~ /\.ht {
18+
deny all;
19+
}
20+
21+
gzip on;
22+
gzip_disable "msie6";
23+
24+
gzip_vary on;
25+
gzip_proxied any;
26+
gzip_comp_level 6;
27+
gzip_buffers 16 8k;
28+
gzip_http_version 1.1;
29+
gzip_types
30+
text/plain
31+
text/css
32+
text/xml
33+
text/javascript
34+
application/javascript
35+
application/x-javascript
36+
application/json
37+
application/xml
38+
application/xml+rss
39+
font/ttf
40+
font/otf
41+
image/svg+xml;
42+
}

0 commit comments

Comments
 (0)