Skip to content

Commit 8824983

Browse files
committed
Add shinylive example
1 parent dae1d83 commit 8824983

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.11 AS builder
2+
3+
RUN pip install uv
4+
5+
COPY ./ /opt/shinylive
6+
7+
WORKDIR /opt/shinylive
8+
9+
RUN uv sync
10+
11+
RUN .venv/bin/shinylive export . shinylive-app
12+
13+
# ---
14+
FROM nginx:latest
15+
16+
COPY --from=builder /opt/shinylive /usr/share/nginx/html
17+
18+
# COPY --from=builder /opt/shinylive/shinylive-app /usr/share/nginx/html

shinylive_without_quarto/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ python3 -m http.server --directory site --bind localhost 8008
2121
```
2222

2323
Navigate to [http://localhost:8008](http://localhost:8008)
24+
25+
Build Docker image to server site with Nginx:
26+
27+
```bash
28+
docker build -t shiny-for-py/shinylive-app-nginx:1.0.0 .
29+
30+
docker run -p 8085:80 --rm shiny-for-py/shinylive-app-nginx:1.0.0
31+
```
32+
33+
Navigate to [http://localhost:8085/shinylive-app/](http://localhost:8085/shinylive-app/)

0 commit comments

Comments
 (0)