yunohost-portal/README.md

28 lines
1.4 KiB
Markdown
Raw Normal View History

2023-07-12 04:52:58 +02:00
## POC for new YunoHost portal
- This is a based on [Nuxt v3](https://nuxt.com/)
2023-07-27 00:58:27 +02:00
### Develop (using Docker)
2023-07-12 04:52:58 +02:00
2023-07-27 00:58:27 +02:00
- Install Docker
2023-07-27 01:04:36 +02:00
- cf [these instructions](https://docs.docker.com/engine/install/debian/#set-up-the-repository) to add Docker's apt repository
2023-07-27 00:58:27 +02:00
- and then `apt update && apt install docker-ce`
- Install Docker-compose
- `pip3 install docker-compose`
2023-07-29 19:32:16 +02:00
- Inside your Yunohost LXC/ynh-dev/???, make sure the new `yunohost-portal-api` service is running and corresponding route is in nginx config
- **Important**: Inside your Yunohost machine, enable CORS from your dev front-end:
- `echo "http://127.0.0.1:3000" > /etc/yunohost/.portal-api-allowed-cors-origins`
- `systemctl restart yunohost-portal-api`
- Back to Yunohost-portal's repo: define what's the IP / domain of your test LXC where the API lives (here, for example, `yolo.test` which is define in `/etc/hosts`):
- `echo 'NUXT_PUBLIC_API_IP=yolo.test' > .env`
2023-07-27 00:58:27 +02:00
- `docker-compose up -d` : will rebuild the docker on the first time, then launch it
- Check `docker-compose logs -f` : should show that nuxt/nitro is building stuff then serving it on port 3000
2023-07-29 19:32:16 +02:00
- Access `http://127.0.0.1:3000` from your browser
2023-07-27 00:58:27 +02:00
### Develop (manual / directly on your host machine)
2023-07-29 19:32:16 +02:00
- Basically the same stuff, but ignore docker-related steps. Instead:
- You'll need NodeJS 18.14 (or higher) and `yarn`
2023-07-12 04:52:58 +02:00
- Run `yarn install`
- Run `yarn dev`