Added debug mode for backend

This commit is contained in:
2020-05-07 15:46:36 +02:00
parent a82fa74a6b
commit 90106df0f6
3 changed files with 41 additions and 6 deletions

View File

@@ -100,11 +100,39 @@
#+END_SRC
** Running in development mode
To run this backend in development mode, you will have to remove the
~--release~ option from the ~webdev~ command in the ~start.sh~ file. This
will allow webdev to compile Dart files faster, but at the price of slower
compiled Javascript files. If you use Docker, dont forget to rebuild your
image.
# To run this backend in development mode, you will have to remove the
# ~--release~ option from the ~webdev~ command in the ~start.sh~ file. This
# will allow webdev to compile Dart files faster, but at the price of slower
# compiled Javascript files. If you use Docker, dont forget to rebuild your
# image.
To run this backend in development mode, you can add to your environment the
variable ~RELEASE~ with the value ~debug~. Running the backend locally, you
would start it like so:
#+BEGIN_SRC sh
RELEASE=debug ./start.sh
#+END_SRC
Running it with Docker, you would use the following command:
#+BEGIN_SRC sh
docker run \
-p 8080:8080 \
-v ./web:/app/web \
-e RELEASE=debug \
--restart always \
--detach \
--name owb \
owb:1.0
#+END_SRC
And with docker-compose, you would add the following line to your ~owb~
service:
#+BEGIN_SRC yaml
environment:
- RELEASE=debug
#+END_SRC
Any other value to this environment variable will make your backend run in
release mode (actually, it will only make ~webdev~ run in release mode).
** How can I use this in my org files?
Lets say you serve your files on org.example.com, add the following lines to