Skip to content

Commit e2d420f

Browse files
authored
🔀 Merge pull request #306 from Lissy93/ARCH/docker-lite
[ARCH] Alpha Version of Dashy-Lite Docker Container
2 parents f489a92 + 611853c commit e2d420f

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.github/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 🐳 1.9.0 - Alpha of Dashy-Lite Docker Container [PR #306](https://github.com/Lissy93/dashy/pull/306)
4+
- Create an Alpine-based container, that serves the built app up with plain NGINX, instead of Node.
5+
- This is much lighter, but doesn't currently support any of the server-side actions (like status-checks, and writing changes to disk)
6+
37
## ✨ 1.8.9 - All New Interactive Config Editor [PR #298](https://github.com/Lissy93/dashy/pull/298)
48
- Builds a new UI-based config editor
59
- Support for sections, items, app config and page info

docker/Dockerfile-lite

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -----------------------------------------------------------------------------------------
2+
# A light-weight alternative Docker image, using NGINX rather than Node.js to serve the app
3+
# This means that certain features that require server-side endpoints will not be available
4+
# -----------------------------------------------------------------------------------------
5+
6+
# Build Stage - Install dependencies + build the app
7+
FROM node:lts-alpine3.14 as build
8+
WORKDIR /dashy
9+
COPY package*.json .
10+
COPY yarn.lock .
11+
RUN yarn
12+
COPY . .
13+
RUN yarn build
14+
15+
# Production Stage - Serve up built files with NGINX
16+
FROM nginx:alpine as production
17+
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
18+
COPY --from=build /dashy/dist /usr/share/nginx/html
19+
EXPOSE 80
20+
ENTRYPOINT ["nginx", "-g", "daemon off;"]
21+
22+
LABEL maintainer="Alicia Sykes <alicia@omg.lol>"

docker/nginx.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
worker_processes 4;
2+
3+
events { worker_connections 1024; }
4+
5+
http {
6+
server {
7+
listen 80;
8+
root /usr/share/nginx/html;
9+
include /etc/nginx/mime.types;
10+
11+
location /appui {
12+
try_files $uri /index.html;
13+
}
14+
}
15+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Dashy",
3-
"version": "1.8.9",
3+
"version": "1.9.0",
44
"license": "MIT",
55
"main": "server",
66
"scripts": {

0 commit comments

Comments
 (0)