Skip to content

Commit 345d642

Browse files
committed
feat(nginx-spa): add nginx-spa image
1 parent c426f01 commit 345d642

File tree

6 files changed

+94
-1
lines changed

6 files changed

+94
-1
lines changed

images/nginx-spa/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM nginx:stable-alpine
2+
3+
RUN sed -i '1idaemon off;' /etc/nginx/nginx.conf
4+
5+
COPY images/nginx-spa/nginx.conf /etc/nginx/conf.d/default.conf
6+
7+
ENTRYPOINT ["nginx"]

images/nginx-spa/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# node-distroless
2+
3+
This image combines the compactness and security of distroless with the convenience of dumb-init for process management, making Node.js applications run more stably in a container environment.
4+
5+
> This image is maintained with node latest LTS version
6+
7+
## Usage
8+
9+
The simple usage example
10+
11+
```dockerfile
12+
FROM ghcr.io/ebizbase/node-distroless
13+
WORKDIR /usr/src/app
14+
COPY . .
15+
CMD [ "index.js" ]
16+
```

images/nginx-spa/nginx.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
server {
2+
listen 80 default_server;
3+
4+
gzip on;
5+
gzip_min_length 1000;
6+
gzip_types text/plain text/xml application/javascript text/css;
7+
8+
root /app;
9+
10+
location / {
11+
add_header Cache-Control "no-store";
12+
try_files $uri $uri/index.html /index.html;
13+
}
14+
15+
location ~ \.(?!html) {
16+
add_header Cache-Control "public, max-age=2678400";
17+
try_files $uri =404;
18+
}
19+
20+
}

images/nginx-spa/project.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "nginx-spa",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "library",
5+
"metadata": {
6+
"version": "1.0.0",
7+
"registries": ["ghcr.io", "docker.io"],
8+
"namespace": "ebizbase/nginx-spa",
9+
"labels": {
10+
"org.opencontainers.image.source": "https://github.com/ebizbase/dev-infras",
11+
"org.opencontainers.image.description": "Nginx image for SPA",
12+
"org.opencontainers.image.licenses": "MIT"
13+
}
14+
},
15+
"tags": [],
16+
"targets": {
17+
"build": {
18+
"executor": "@ebizbase/nx-docker:build",
19+
"options": {
20+
"load": true,
21+
"tags": ["edge"]
22+
}
23+
},
24+
"test": {
25+
"dependsOn": ["build"],
26+
"executor": "nx:run-commands",
27+
"options": {
28+
"command": "docker run --rm ebizbase/nginx-spa:edge -T"
29+
}
30+
},
31+
"publish": {
32+
"executor": "@ebizbase/nx-docker:build",
33+
"options": {
34+
"push": true,
35+
"tags": ["latest", "{major}", "{major}.{minor}", "{major}.{minor}.{patch}"]
36+
}
37+
}
38+
}
39+
}

release-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,16 @@
113113
"jsonpath": "$.metadata.version"
114114
}
115115
]
116+
},
117+
"images/nginx-spa": {
118+
"package-name": "nginx-spa",
119+
"extra-files": [
120+
{
121+
"type": "json",
122+
"path": "project.json",
123+
"jsonpath": "$.metadata.version"
124+
}
125+
]
116126
}
117127
}
118128
}

release-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
"devcontainer-images/node-dind-devcontainer": "1.0.0",
1212
"devcontainer-images/node-dind-playwright-devcontainer": "1.0.0",
1313
"devcontainer-images/node-playwright-devcontainer": "1.0.0",
14-
"images/node-distroless": "1.0.0"
14+
"images/node-distroless": "1.0.0",
15+
"images/nginx-spa": "0.0.0"
1516
}

0 commit comments

Comments
 (0)