Added debug mode for backend
This commit is contained in:
parent
a82fa74a6b
commit
90106df0f6
38
README.org
38
README.org
@ -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, don’t 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, don’t 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?
|
||||
Let’s say you serve your files on org.example.com, add the following lines to
|
||||
|
@ -6,5 +6,7 @@ services:
|
||||
ports:
|
||||
- 8010:8080
|
||||
restart: always
|
||||
environment:
|
||||
- RELEASE=debug
|
||||
volumes:
|
||||
- ./web:/app/web
|
||||
|
Reference in New Issue
Block a user