Skip to content

Commit 3084e92

Browse files
committed
Improve the developer documentation
1 parent 40f6447 commit 3084e92

1 file changed

Lines changed: 33 additions & 6 deletions

File tree

README.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ Additional Documentation
1010
- [Deployment][docs-deployment]
1111
- [Administration][docs-admin]
1212

13-
Development Configuration
14-
-------------------------
15-
16-
### PostgreSQL
13+
Database Configuration
14+
----------------------
1715

1816
Install PostgreSQL, create database and user for LogList. Install and
1917
activate the following extensions:
@@ -26,6 +24,19 @@ You can activate extension pgcrypto with following line in postgresql console:
2624
CREATE EXTENSION pgcrypto;
2725
```
2826

27+
Development Configuration
28+
-------------------------
29+
30+
### PostgreSQL container
31+
32+
If you want to quickly run LogList in a dockerized environment while keeping the
33+
code locally (e.g. to debug the code), run the following commands to start
34+
development PostgreSQL instance:
35+
36+
```console
37+
$ docker-compose run --publish '5432:5432' db
38+
```
39+
2940
### Environment Variables
3041

3142
Possible environment variables can be found in the `devenv.example`
@@ -36,14 +47,30 @@ file. Supposed workflow:
3647
... Modify variables ...
3748
... All variable names should be self-explanatory
3849
$ . ./devenv
39-
$ sbt run
4050

4151
The same sample setup for Windows:
4252

4353
PS> cp devenv.ps1.example devenv.ps1
4454
PS> notepad devenv.ps1 # Edit the configuration...
4555
PS> .\devenv.ps1
46-
PS> sbt run
56+
57+
### Running the application
58+
59+
To run the application in a container, run the following command:
60+
61+
```console
62+
$ docker-compose --project-name loglist up
63+
```
64+
65+
And then open `http://localhost:9000` in a browser.
66+
67+
To run the application locally, make sure you've set up the environment
68+
variables as described in the previous section, and then execute the following
69+
command:
70+
71+
```console
72+
$ sbt scalajvm/run
73+
```
4774

4875
License
4976
-------

0 commit comments

Comments
 (0)