forked from Somnia/SomniaRoomsApp
42437881c444d49669dbbb9a041cfd5e1fa94aaf
SomniaRoomsApp
User app for SomniaRooms.
Podman Usage:
Dev
Build Image:
podman build -t somniarooms-app:dev --target final-dev .
Podman Run Image:
podman run -d -it --rm -v ${PWD}:/app -v /app/node_modules -p 3000:3000 --name somniarooms-app somniarooms-app:dev
Notas:
- Usar
-rmpara eliminar el contenedor y sus volúmenes en stop. - Usar
-dpara modo detached.
Prod:
Build Image
podman build -t somniarooms-app:prod --target final-prod .
Podman Run
podman run -d -it -p 8080:80 --name somniarooms-app somniarooms-app:prod
Podman run with env vars:
podman run -d -it -p 8080:80 --name somniarooms-app -e SOMNIAROOMS_BACKEND_HOST=https://somniaapi.example.org/ -e SOMNIAROOMS_BACKEND_PORT=443 somniarooms-app:prod
Env Vars.
As this is distributed as a image ready to use, you must set some env variables to configure the app:
| Var | Default Value | Description |
|---|---|---|
SOMNIAROOMS_BACKEND_HOST |
https://somniaapi.example.org/ | Host where uses can connect to the SomniaRoom API. API endpoint should be reachble for uses. |
SOMNIAROOMS_BACKEND_PORT |
443 | Port to SomniarRooms API. |
.env files
This project uses .env files to configure the app. As Vite only supports compile-time vars, we use some tricks to allow setting variables from container env variables.
.env
Contains default values. It is just an example configuration.
For development is recomended to create a .env.local file based on .env.
.env.production
Set varibles to certains placeholder, that are replace on container startup.
(We are using this solution: https://stackoverflow.com/a/77454537)
Languages
TypeScript
94.3%
JavaScript
2.4%
CSS
1.8%
Dockerfile
0.7%
Shell
0.4%
Other
0.4%