-
Notifications
You must be signed in to change notification settings - Fork 9
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 #1442 from navikt/oppskrift-for-å-debugge-frackend…
…-som-kjører-i-docker Oppsett for å debugge inni docker
- Loading branch information
Showing
5 changed files
with
32 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM gcr.io/distroless/nodejs20-debian12:nonroot | ||
COPY . /app | ||
|
||
WORKDIR /app | ||
EXPOSE 8080 | ||
CMD ["--inspect=0.0.0.0:9229", "dist/index.js"] |
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 |
---|---|---|
@@ -1,14 +1,29 @@ | ||
# Frontend for teams | ||
# Frackend for teamkatalogen | ||
|
||
### Requires node 16 | ||
### Hent secret | ||
|
||
### Set up local env | ||
run python script localenv_setup.py for å få korrekte azure varaiable etc fra k8s secrets | ||
```bash | ||
gcloud auth login | ||
|
||
`python3 localenv_setup.py` | ||
# Fra rot kjører du: | ||
python setup_local_azure_secrets.py | ||
``` | ||
|
||
### Install deps | ||
### Installer pakker | ||
`npm ci` | ||
|
||
### Kjør Frackend | ||
`npm run start` | ||
### Bygg Frackend | ||
`npm run build` | ||
|
||
### Kjør docker-compose | ||
`docker-compose up -d --build` | ||
Denne fyrer opp lokal Wonderwall + Frackend | ||
|
||
### Debug Frackend som kjører i Docker | ||
Når Express-serveren kjører lokalt i Docker så eksponerer den port 9229 som du kan koble en debugger til. | ||
|
||
For å få til dette må du lage en debug configuration: | ||
1. Edit configurations | ||
2. Klikk + og velg `attach to Node.js/Chrome` | ||
3. Host: `localhost` port `9229` | ||
4. Kjør så konfigurasjonen og du er klar til å debugge! |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.