Added env variables, fixes #1

pull/6/head
Quentin McGaw (desktop) 5 years ago
parent a8a69573dc
commit 2521d2531a

@ -41,6 +41,21 @@ EXPOSE 8000
HEALTHCHECK --start-period=1s --interval=100s --timeout=2s --retries=1 CMD ["/server","healthcheck"] HEALTHCHECK --start-period=1s --interval=100s --timeout=2s --retries=1 CMD ["/server","healthcheck"]
USER 1000 USER 1000
ENTRYPOINT ["/server"] ENTRYPOINT ["/server"]
ENV \
LISTENING_PORT=8000 \
ROOT_URL=/ \
NODE_ENV=production \
PANDOC_PATH=pandoc \
WKHTMLTOPDF_PATH=wkhtmltopdf \
USER_BUCKET_NAME=stackedit-users \
PAYPAL_RECEIVER_EMAIL= \
DROPBOX_APP_KEY= \
DROPBOX_APP_KEY_FULL= \
GITHUB_CLIENT_ID= \
GITHUB_CLIENT_SECRET= \
GOOGLE_CLIENT_ID= \
GOOGLE_API_KEY= \
WORDPRESS_CLIENT_ID=
COPY --from=stackedit --chown=1000 /stackedit/dist /html/dist COPY --from=stackedit --chown=1000 /stackedit/dist /html/dist
COPY --from=stackedit --chown=1000 /stackedit/static /html/static COPY --from=stackedit --chown=1000 /stackedit/static /html/static
COPY --from=server --chown=1000 /tmp/gobuild/app /server COPY --from=server --chown=1000 /tmp/gobuild/app /server

@ -62,8 +62,22 @@
## Environment variables ## Environment variables
- `LISTENING_PORT` to change the internal HTTP server listening port if you need to | Environment variable | Default | Description |
- `ROOT_URL` to define a root URL (i.e. `/mypath`) if you use a reverse proxy such as Nginx | --- | --- | --- |
| `LISTENING_PORT` | `8000` | Internal server listening port |
| `ROOT_URL` | `/` | Root URL to use, useful when used with a reverse proxy |
| `NODE_ENV` | `production` | Sets production behavior for stackedit |
| `PANDOC_PATH` | `pandoc` | *Non functional yet* |
| `WKHTMLTOPDF_PATH` | `wkhtmltopdf` | *Non functional yet* |
| `USER_BUCKET_NAME` | `stackedit-users` | ? |
| `PAYPAL_RECEIVER_EMAIL` | | Receive Paypal donation email address |
| `DROPBOX_APP_KEY` | | |
| `DROPBOX_APP_KEY_FULL` | | |
| `GITHUB_CLIENT_ID` | | |
| `GITHUB_CLIENT_SECRET` | | |
| `GOOGLE_CLIENT_ID` | | |
| `GOOGLE_API_KEY` | | |
| `WORDPRESS_CLIENT_ID` | | |
## Acknowledgements ## Acknowledgements
@ -71,5 +85,7 @@ Credits to the [developers](https://github.com/benweet/stackedit/graphs/contribu
## TODOs ## TODOs
- [ ] Configuration of Stackedit with env variables - [ ] Add static binary programs
- [ ] pandoc
- [ ] wkhtmltopdf
- [ ] Travis CI build cross CPU arch - [ ] Travis CI build cross CPU arch

@ -3,6 +3,18 @@ services:
stackedit: stackedit:
image: qmcgaw/stackedit image: qmcgaw/stackedit
container_name: stackedit container_name: stackedit
environment:
- LISTENING_PORT=8000
- ROOT_URL=/
- USER_BUCKET_NAME=stackedit-users
- PAYPAL_RECEIVER_EMAIL=
- DROPBOX_APP_KEY=
- DROPBOX_APP_KEY_FULL=
- GITHUB_CLIENT_ID=
- GITHUB_CLIENT_SECRET=
- GOOGLE_CLIENT_ID=
- GOOGLE_API_KEY=
- WORDPRESS_CLIENT_ID=
ports: ports:
- 8000:8000/tcp - 8000:8000/tcp
network_mode: bridge network_mode: bridge

Loading…
Cancel
Save