Update README
This commit is contained in:
parent
160617af60
commit
0c58c82aa6
1 changed files with 27 additions and 26 deletions
53
README.md
53
README.md
|
@ -1,38 +1,39 @@
|
||||||
# sv
|
# Brawlset
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).
|
Le brawlset est un mode de jeu [Magic The Gathering](https://magic.wizards.com/en). Cette application web permet de rentrer ses propres decks et d'avoir des statistiques sur l'utilisation des cartes à la manière de [EDHREC](https://edhrec.com/).
|
||||||
|
|
||||||
## Creating a project
|
Une version en ligne est accessible [ici](https://brawlset-beta.shenanigans.cc).
|
||||||
|
|
||||||
If you're seeing this, you've probably already done this step. Congrats!
|
# Compilation
|
||||||
|
|
||||||
```bash
|
Pour développer, vous devez compiler et lancer une instance de pocketbase custom comme ceci :
|
||||||
# create a new project in the current directory
|
```
|
||||||
npx sv create
|
cd backend
|
||||||
|
go build -o custom_pocketbase *.go
|
||||||
# create a new project in my-app
|
GO_ENV=dev ./custom_pocketbase serve
|
||||||
npx sv create my-app
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Developing
|
Vous pouvez accéder à l'application pocketbase à l'adresse `http://localhost:8090` mais toutes les requêtes qui ne sont pas de l'api ou du dashboard pockerbase seront renvoyées vers `http://localhost:5173` afin de pouvoir éditer l'application svelte en mode dev. Vous devez donc lancer une instance de sveltekit en mode dev :
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
```
|
||||||
|
cd frontend
|
||||||
```bash
|
bun install
|
||||||
npm run dev
|
bun run dev
|
||||||
|
|
||||||
# or start the server and open the app in a new browser tab
|
|
||||||
npm run dev -- --open
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building
|
# Production
|
||||||
|
|
||||||
To create a production version of your app:
|
Pour déployer l'application je recommande d'utiliser l'image docker `git.shenanigans.cc/globuzma/brawlset:latest`, n'oubliez pas de monter un volume pour `/usr/src/app/pb_data` afin d'avoir de la persistence de données et de forward sur le port `8090`.
|
||||||
|
|
||||||
```bash
|
Docker compose :
|
||||||
npm run build
|
```
|
||||||
|
services:
|
||||||
|
brawlset:
|
||||||
|
image: git.shenanigans.cc/globuzma/brawlset:latest
|
||||||
|
container_name: brawlset
|
||||||
|
ports:
|
||||||
|
- 8090:8090
|
||||||
|
- volumes:
|
||||||
|
- - ${PWD}/pb_data:/usr/src/app/pb_data
|
||||||
|
- restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
You can preview the production build with `npm run preview`.
|
|
||||||
|
|
||||||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue