Skip to content

Commit

Permalink
Add first working version
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Dec 8, 2023
1 parent 915c9b1 commit 669f0c8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 108 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18.3
FROM lscr.io/linuxserver/firefox:101.0.1

RUN apk update && apk add nginx

Expand All @@ -8,11 +8,12 @@ COPY files/nginx.conf /etc/nginx/nginx.conf
# Add our static files to a common folder to be provided by nginx
RUN mkdir -p /site
COPY files/register_service /site/register_service
COPY sites/* /site/

# Copy everything for your application
COPY files/entrypoint.sh /entrypoint.sh

RUN rm /defaults/autostart

# Add docker configuration
LABEL permissions='{\
"ExposedPorts": {\
Expand All @@ -25,8 +26,17 @@ LABEL permissions='{\
"HostPort": ""\
}\
]\
}\
}\
},\
"Binds": [\
"/dev:/dev:rw"\
],\
"Privileged": true\
},\
"Env": [\
"PUID=1000",\
"PGID=1000",\
"TZ=Etc/UTC"\
]\
}'
LABEL authors='[\
{\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# blueos-extension-template
# blueos-firefox
1 change: 1 addition & 0 deletions files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ set -m
echo "Starting nginx.."
nginx &
echo "Starting our application.."
firefox
sleep infinity
21 changes: 6 additions & 15 deletions files/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@ http {
listen 0.0.0.0:80;

location / {
root /site;
autoindex on;
proxy_pass http://0.0.0.0:3000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /register_service {
alias /site/register_service;
}

# Proxy configuration to redirect by default all
# connections our service's port
# location / {
# proxy_pass http://0.0.0.0:1880;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "Upgrade";
# }
# Provide register_service for BlueOS registration
# if the service does not provide it
# location /register_service {
# alias /site/register_service;
# }
}
}
3 changes: 2 additions & 1 deletion files/register_service
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"company": "ACME Corporation",
"version": "0.0.0",
"new_page": true,
"webpage": "https://github.com/patrickelectric/blueos-extension-template"
"webpage": "https://github.com/patrickelectric/blueos-extension-template",
"api": ""
}
51 changes: 0 additions & 51 deletions site/index.html

This file was deleted.

36 changes: 0 additions & 36 deletions site/styles.css

This file was deleted.

0 comments on commit 669f0c8

Please sign in to comment.