Skip to content

Commit 804372e

Browse files
authored
Update configuration.md
improve configuration documentation Fixes #844
1 parent e35c491 commit 804372e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

configuration.md

+24
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,30 @@ For instance, if you want to create a custom `my_component` component, that disp
109109

110110
[See the full custom component documentation](https://sql-page.com/custom_components.sql).
111111

112+
## Directories
113+
114+
SQLPage needs two important directories to work: the configuration directory, and the web root.
115+
116+
### Configuration directory
117+
118+
The configuration directory is the `./sqlpage/` folder by default.
119+
In the [official docker image](https://hub.docker.com/r/lovasoa/sqlpage), it is located in `/etc/sqlpage/`.
120+
It can be configured using the `--config-dir` command-line argument, or the `SQLPAGE_CONFIGURATION_DIRECTORY` environment variable.
121+
122+
It can contain
123+
124+
- the [`sqlpage.json`](#configuring-sqlpage) configuration file,
125+
- the [`templates`](#custom-components) directory,
126+
- the [`migrations`](#migrations) directory,
127+
- the [connection management](#connection-management) sql files.
128+
129+
### Web Root
130+
131+
The web root is where you place your sql files.
132+
By default, it is set to the current working directory, from which the sqlpage binary is launched.
133+
In the [official docker image](https://hub.docker.com/r/lovasoa/sqlpage), the web root is set to `/var/www`.
134+
It can be configured using the `--web-root` command-line argument, or the `SQLPAGE_WEB_ROOT` environment variable.
135+
112136
## Connection management
113137

114138
### Connection initialization scripts

0 commit comments

Comments
 (0)