mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Adding wrolpi-app-dev which runs frontend in dev mode.
This commit is contained in:
parent
7e9e815bf6
commit
a02c47cfa1
4 changed files with 30 additions and 1 deletions
|
|
@ -50,6 +50,15 @@ DEFAULT_CONFIG = {
|
|||
"use_https": False,
|
||||
"description": "React frontend",
|
||||
},
|
||||
{
|
||||
"name": "wrolpi-app-dev",
|
||||
"systemd_name": "wrolpi-app-dev",
|
||||
"port": 3000,
|
||||
"viewable": False,
|
||||
"use_https": False,
|
||||
"description": "React frontend (Development)",
|
||||
"show_only_when_running": True,
|
||||
},
|
||||
{
|
||||
"name": "wrolpi-help",
|
||||
"systemd_name": "wrolpi-help",
|
||||
|
|
|
|||
|
|
@ -57,12 +57,15 @@ class TestManagedServicesConfig:
|
|||
def test_managed_services_count(self):
|
||||
"""Should have expected number of managed services."""
|
||||
services = DEFAULT_CONFIG["managed_services"]
|
||||
assert len(services) == 10
|
||||
assert len(services) == 12
|
||||
|
||||
@pytest.mark.parametrize("name,expected", [
|
||||
("wrolpi-api",
|
||||
{"systemd_name": "wrolpi-api", "port": 8081, "viewable": True, "description": "Python API (Sanic)"}),
|
||||
("wrolpi-api-dev",
|
||||
{"systemd_name": "wrolpi-api-dev", "port": 8081, "viewable": True, "show_only_when_running": True}),
|
||||
("wrolpi-app", {"port": 3000, "viewable": False}),
|
||||
("wrolpi-app-dev", {"port": 3000, "viewable": False, "show_only_when_running": True}),
|
||||
("nginx", {"port": 80}),
|
||||
("postgresql", {"port": 5432, "viewable": False}),
|
||||
("wrolpi-upgrade", {"port": None, "viewable": False, "show_only_when_running": True}),
|
||||
|
|
|
|||
16
etc/raspberrypios/wrolpi-app-dev.service
Normal file
16
etc/raspberrypios/wrolpi-app-dev.service
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=WROLPi React APP (Development)
|
||||
Wants=wrolpi-api.service
|
||||
PartOf=wrolpi.target
|
||||
Conflicts=wrolpi-app.service
|
||||
|
||||
[Service]
|
||||
Environment=PORT=3000
|
||||
ExecStart=/usr/bin/npm start
|
||||
Group=wrolpi
|
||||
User=wrolpi
|
||||
WorkingDirectory=/opt/wrolpi/app/
|
||||
Nice=6
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
Description=WROLPi React APP
|
||||
Wants=wrolpi-api.service
|
||||
PartOf=wrolpi.target
|
||||
Conflicts=wrolpi-app-dev.service
|
||||
|
||||
[Service]
|
||||
# Use explicit `serve.json` so `epub.html` is not lost.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue