mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-14 17:18:33 +00:00
Resolve "Small baserow docker doc + docker improvements"
This commit is contained in:
parent
64c69fdefc
commit
5133f09a92
5 changed files with 66 additions and 6 deletions
|
@ -49,6 +49,13 @@ services:
|
||||||
- DATABASE_NAME=${DATABASE_NAME:-baserow}
|
- DATABASE_NAME=${DATABASE_NAME:-baserow}
|
||||||
- ADDITIONAL_APPS
|
- ADDITIONAL_APPS
|
||||||
- MEDIA_URL=http://localhost:${MEDIA_PORT:-4000}/media/
|
- MEDIA_URL=http://localhost:${MEDIA_PORT:-4000}/media/
|
||||||
|
- EMAIL_SMTP
|
||||||
|
- EMAIL_SMTP_HOST
|
||||||
|
- EMAIL_SMTP_PORT
|
||||||
|
- EMAIL_SMPT_USE_TLS
|
||||||
|
- EMAIL_SMTP_USER
|
||||||
|
- EMAIL_SMTP_PASSWORD
|
||||||
|
- FROM_EMAIL
|
||||||
ports:
|
ports:
|
||||||
- "${BACKEND_PORT:-8000}:8000"
|
- "${BACKEND_PORT:-8000}:8000"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -70,6 +77,15 @@ services:
|
||||||
command: celery
|
command: celery
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
environment:
|
||||||
|
- ADDITIONAL_APPS
|
||||||
|
- EMAIL_SMTP
|
||||||
|
- EMAIL_SMTP_HOST
|
||||||
|
- EMAIL_SMTP_PORT
|
||||||
|
- EMAIL_SMPT_USE_TLS
|
||||||
|
- EMAIL_SMTP_USER
|
||||||
|
- EMAIL_SMTP_PASSWORD
|
||||||
|
- FROM_EMAIL
|
||||||
volumes:
|
volumes:
|
||||||
- media:/baserow/media
|
- media:/baserow/media
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -24,6 +24,9 @@ If you haven't already installed docker and docker-compose on your computer you
|
||||||
so by following the instructions on https://docs.docker.com/desktop/ and
|
so by following the instructions on https://docs.docker.com/desktop/ and
|
||||||
https://docs.docker.com/compose/install/.
|
https://docs.docker.com/compose/install/.
|
||||||
|
|
||||||
|
> Docker version 20.10.0 is the minimum required to build Baserow. Please check that
|
||||||
|
> your docker is up to date by running `docker -v`.
|
||||||
|
|
||||||
You will also need git installed which you can do by following the instructions on
|
You will also need git installed which you can do by following the instructions on
|
||||||
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/
|
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/
|
||||||
.
|
.
|
||||||
|
@ -33,9 +36,9 @@ the following commands in your terminal.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker -v
|
$ docker -v
|
||||||
Docker version 19.03.8, build afacb8b
|
Docker version 20.10.6, build 370c289
|
||||||
$ docker-compose -v
|
$ docker-compose -v
|
||||||
docker-compose version 1.25.5, build 8a1c60f6
|
docker-compose version 1.26.2, build eefe0d31
|
||||||
$ git --version
|
$ git --version
|
||||||
git version 2.24.3 (Apple Git-128)
|
git version 2.24.3 (Apple Git-128)
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
Find below a list of FAQs and common operations when working with Baserow's docker
|
Find below a list of FAQs and common operations when working with Baserow's docker
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
|
> Docker version 20.10.0 is the minimum required to build Baserow. Please check that
|
||||||
|
> your docker is up to date by running `docker -v`.
|
||||||
|
|
||||||
See [baserow's docker api](../reference/baserow-docker-api.md) for the full details on
|
See [baserow's docker api](../reference/baserow-docker-api.md) for the full details on
|
||||||
what commands and environment variables baserow's docker-compose and docker image's
|
what commands and environment variables baserow's docker-compose and docker image's
|
||||||
support.
|
support.
|
||||||
|
@ -53,6 +56,16 @@ $ # or using dev.sh
|
||||||
$ POSTGRES_PORT=5555 REDIS_PORT=6666 MJML_PORT=7777 ./dev.sh
|
$ POSTGRES_PORT=5555 REDIS_PORT=6666 MJML_PORT=7777 ./dev.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Configure an external email server
|
||||||
|
|
||||||
|
See [the introduction](../getting-started/introduction.md) for the all the of email
|
||||||
|
environment variables available to configure Baserow. For a simple example you can start
|
||||||
|
up Baserow locally and have it connect to an external SMTP server like so:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
EMAIL_SMTP_HOST=TODO EMAIL_SMTP_PORT=TODO EMAIL_SMTP=True docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
### Change the container user
|
### Change the container user
|
||||||
|
|
||||||
When running the dev env you can set the `UID` and `GID` environment variables when
|
When running the dev env you can set the `UID` and `GID` environment variables when
|
||||||
|
@ -116,12 +129,19 @@ $ ./dev.sh run backend manage sync_templates
|
||||||
|
|
||||||
## Common Problems
|
## Common Problems
|
||||||
|
|
||||||
|
### Build Error - Service 'backend' failed to build: unable to convert uid/gid chown
|
||||||
|
|
||||||
|
This error occurs when attempting to build Baserow's docker images with a version of
|
||||||
|
Docker earlier than 20.10.0. You can check your local docker version by
|
||||||
|
running `docker -v` and fix the error by installing the latest version of Docker from
|
||||||
|
https://docs.docker.com/get-docker/.
|
||||||
|
|
||||||
### Permission denied errors
|
### Permission denied errors
|
||||||
|
|
||||||
If you used Baserow's dev env prior to April 2021 with the provided docker files you
|
If you used Baserow's dev env prior to April 2021 with the provided docker files you
|
||||||
might encounter permission errors in the containers when upgrading. With the old docker
|
might encounter permission errors in the containers when upgrading. With the old docker
|
||||||
files build output could end up being owned by root. These root owned files if they
|
files build output could end up being owned by root. These root owned files if they
|
||||||
still exist in your repo will cause a problem starting the new dev env as Baserow's
|
still exist in your repo will cause a problem starting the new dev env as Baserow's
|
||||||
containers now run as a non-root user.
|
containers now run as a non-root user.
|
||||||
|
|
||||||
To fix simply ensure all files in your baserow git repo are owned by your current user
|
To fix simply ensure all files in your baserow git repo are owned by your current user
|
||||||
|
|
|
@ -21,6 +21,9 @@ If you haven't already installed docker and docker-compose on your computer you
|
||||||
so by following the instructions on https://docs.docker.com/desktop/ and
|
so by following the instructions on https://docs.docker.com/desktop/ and
|
||||||
https://docs.docker.com/compose/install/.
|
https://docs.docker.com/compose/install/.
|
||||||
|
|
||||||
|
> Docker version 20.10.0 is the minimum required to build Baserow. Please ensure your
|
||||||
|
> your docker is up to date by running `docker -v`.
|
||||||
|
|
||||||
You will also need git installed which you can do by following the instructions on
|
You will also need git installed which you can do by following the instructions on
|
||||||
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/.
|
https://www.linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/.
|
||||||
|
|
||||||
|
@ -29,9 +32,9 @@ following commands in your terminal.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker -v
|
$ docker -v
|
||||||
Docker version 19.03.8, build afacb8b
|
Docker version 20.10.6, build 370c289
|
||||||
$ docker-compose -v
|
$ docker-compose -v
|
||||||
docker-compose version 1.25.5, build 8a1c60f6
|
docker-compose version 1.26.2, build eefe0d31
|
||||||
$ git --version
|
$ git --version
|
||||||
git version 2.24.3 (Apple Git-128)
|
git version 2.24.3 (Apple Git-128)
|
||||||
```
|
```
|
||||||
|
|
|
@ -124,8 +124,26 @@ Backend configuration:
|
||||||
- `SYNC_TEMPLATES_ON_STARTUP` (default `true`) : When `true` on backend server startup
|
- `SYNC_TEMPLATES_ON_STARTUP` (default `true`) : When `true` on backend server startup
|
||||||
it will run the baserow management command `sync_templates` which loads any templates
|
it will run the baserow management command `sync_templates` which loads any templates
|
||||||
found in `./backend/templates` into Baserow.
|
found in `./backend/templates` into Baserow.
|
||||||
|
|
||||||
|
Pass through variables:
|
||||||
|
|
||||||
### Dev Only Variables
|
These environment variables when provided to the docker-compose files are passed through
|
||||||
|
to the correct containers. See [the introduction](../getting-started/introduction.md)
|
||||||
|
for what these variables do.
|
||||||
|
|
||||||
|
- `PUBLIC_BACKEND_URL`
|
||||||
|
- `PUBLIC_WEB_FRONTEND_URL`
|
||||||
|
- `MEDIA_URL`
|
||||||
|
- `EMAIL_SMTP`
|
||||||
|
- `EMAIL_SMTP_HOST`
|
||||||
|
- `EMAIL_SMTP_PORT`
|
||||||
|
- `EMAIL_SMPT_USE_TLS`
|
||||||
|
- `EMAIL_SMTP_USER`
|
||||||
|
- `EMAIL_SMTP_PASSWORD`
|
||||||
|
- `FROM_EMAIL`
|
||||||
|
|
||||||
|
|
||||||
|
### Dev Only Variables
|
||||||
|
|
||||||
- `UID` (default `1000` or your user id when using `./dev.sh`) : Sets which user id will
|
- `UID` (default `1000` or your user id when using `./dev.sh`) : Sets which user id will
|
||||||
be used to build Baserow's images with and the user id which will be used to run the
|
be used to build Baserow's images with and the user id which will be used to run the
|
||||||
|
|
Loading…
Add table
Reference in a new issue