Compare commits

..

3 commits
v0.3.5 ... main

Author SHA1 Message Date
4cbf1ca7c3
ci: set fetch-depth to 0
All checks were successful
Visitenbuch CI / test (push) Successful in 2m21s
Visitenbuch CI / release (push) Has been skipped
2024-05-24 17:49:06 +02:00
297f5cfa92
update README
All checks were successful
Visitenbuch CI / test (push) Successful in 2m20s
Visitenbuch CI / release (push) Has been skipped
2024-05-21 03:58:13 +02:00
8179c83383
update README
All checks were successful
Visitenbuch CI / test (push) Successful in 2m26s
Visitenbuch CI / release (push) Has been skipped
2024-05-20 22:59:27 +02:00
2 changed files with 37 additions and 9 deletions

View file

@ -68,7 +68,7 @@ jobs:
- name: 👁️ Checkout repository - name: 👁️ Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 1 # important to fetch tag logs fetch-depth: 0 # important to fetch tag logs
- name: 📦 pnpm install - name: 📦 pnpm install
run: pnpm install run: pnpm install

View file

@ -4,21 +4,34 @@ for the university hospital in Augsburg
## Development ## Development
The project template was created using [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). The project template was created using
[`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: Once you've created a project and installed dependencies with `npm install` (or
`pnpm install` or `yarn`), start a development server:
```bash ```bash
npm run dev pnpm run dev
# or start the server and open the app in a new browser tab # or start the server and open the app in a new browser tab
npm run dev -- --open pnpm run dev -- --open
``` ```
### Handle the prisma ORM ### Test environment
Copy the `.env.example` file to `.env` to get access to the required configuration
variables.
The project depends on a PostgreSQL database and an OIDC authentication server. You can
setup both using the `run/db_up.sh` script. This creates a new testing environment using
docker-compose and fills the test database with mock data.
### Use the Pisma ORM
If you apply changes to the database scheme, you have to create a new migration to apply
these changes to the database.
```bash ```bash
./run/db_up.sh # Start the docker container, create a new database and run migrations + insert test data
npx prisma migrate dev --name my_migration --create-only # Create a new migration npx prisma migrate dev --name my_migration --create-only # Create a new migration
npx prisma migrate dev # Apply migrations to the database npx prisma migrate dev # Apply migrations to the database
``` ```
@ -28,12 +41,20 @@ npx prisma migrate dev # Apply migrations to the database
To create a production version of your app: To create a production version of your app:
```bash ```bash
npm run build pnpm run build
``` ```
You can preview the production build with `npm run preview`. You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. > To deploy your app, you may need to install an
> [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
### Test
```bash
pnpm test # Unit- und Integrationstests
pnpm test:e2e # End2End-Tests
```
### Release ### Release
@ -42,3 +63,10 @@ To release a new version, tun the release script with the new version as a param
```bash ```bash
./release.sh 1.0.0 ./release.sh 1.0.0
``` ```
### Building docker image
```bash
pnpm run build
docker build -t thetadev256/visitenbuch .
```