-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from kieler/improve-backend-dev-experience
Improve dev experience
- Loading branch information
Showing
6 changed files
with
547 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Railtrail Backend | ||
|
||
## Devlopment setup | ||
|
||
### Docker | ||
|
||
First fire up the `docker-compose-dev.yml` to get the database running on your system: | ||
|
||
```bash | ||
docker-compose -f docker-compose-dev.yml up -d | ||
``` | ||
|
||
### Express.js | ||
|
||
To start developing the express.js backend use the following commands: | ||
|
||
```bash | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
This will start the application and automatically restarts it on file change. | ||
|
||
### Prisma | ||
|
||
To generate the prisma client and push the changes to the database use this command: | ||
|
||
```bash | ||
npm run prisma | ||
``` | ||
|
||
And if you want to inscept the database with the corresponding prisma schema use the follwing command to start prisma studio: | ||
|
||
```bash | ||
npx prisma studio | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '3.8' | ||
|
||
services: | ||
postgres: | ||
image: postgres:15-alpine | ||
restart: unless-stopped | ||
environment: | ||
- POSTGRES_USER=${POSTGRES_USER} | ||
- POSTGRES_PASSWORD=${POSTGRES_PWD} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- railtrail-database:/var/lib/postgresql/data | ||
networks: | ||
- railtrail | ||
|
||
#railtrail-website: | ||
# image: ghcr.io/kieler/railtrail-website:development | ||
# restart: unless-stopped | ||
# ports: # @Sascha: Je nach Reverse-Proxy Situation hier bitte den Port anpassen: | ||
# - "80:3000" | ||
# environment: | ||
# - PORT=3000 | ||
# - BACKEND_URI=https://railtrail.rtsys.informatik.uni-kiel.de:8080 # @Sascha: Je nach Reverse-Proxy Situation hier bitte die URI anpassen. Ohne Anführungsstriche o.ä.: | ||
# networks: | ||
# - railtrail | ||
|
||
volumes: | ||
railtrail-database: | ||
|
||
networks: | ||
railtrail: |
Oops, something went wrong.