Skip to content

Commit d686824

Browse files
committed
Add README
1 parent 3d5e885 commit d686824

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

basic-app/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Basic app
2+
3+
## Quickstart
4+
5+
```bash
6+
docker compose up --build [-d]
7+
8+
docker compose down
9+
```
10+
11+
Run with Nginx as load balancer:
12+
13+
```bash
14+
docker compose -f docker-compose.lb.yml up --build [-d]
15+
16+
docker compose -f docker-compose.lb.yml down
17+
```
18+
19+
## `systemd` service
20+
21+
See [shiny-basic-app.service](shiny-basic-app.service)
22+
23+
```bash
24+
# Create dir where you want to put your apps
25+
mkdir -p /opt/shiny_apps
26+
27+
# Copy app
28+
cp -r basic-app /opt/shiny_apps/my_app
29+
30+
# Add service file tp systemd dir
31+
cp shiny-basic-app.service /etc/systemd/system/shiny-app.service
32+
33+
# Setup virtual env
34+
cd /opt/shiny_apps
35+
uv init
36+
uv add -r my_app/requirements.txt
37+
38+
# Reload daemon
39+
systemctl daemon-reload
40+
41+
# Start service
42+
systemctl start shiny-app
43+
systemctl status shiny-app
44+
```

basic-app/docker-compose.lb.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
services:
22
nginx:
33
image: nginx:latest
4+
restart: always
45
depends_on:
56
- shiny_app
67
ports:

0 commit comments

Comments
 (0)