mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-04 13:15:24 +00:00
Various docker fixes:
- Dont use a named volume to store node_modules in the dev env to always get a fresh image based node_modules - Fix the PUBLIC_WEB_FRONTEND_URL mis config in the docker-compose file - Update docs for publicly exposing baserow - Fix bad link in docs
This commit is contained in:
parent
c51efc7490
commit
af96c3d730
5 changed files with 23 additions and 23 deletions
|
@ -13,8 +13,8 @@ Gitter https://gitter.im/bramw-baserow/community.
|
|||
> redis, db and mjml containers. Additionally, 1.4.2 only exposes the backend,
|
||||
> web-frontend and media containers on localhost and not on 0.0.0.0. If you were
|
||||
> previously relying on `docker-compose.yml` publicly exposing Baserow then please
|
||||
> follow the [Make Baserow publicly accessible](./docs/guides/running-baserow-locally.md)
|
||||
> guide.
|
||||
> follow the [Make Baserow publicly accessible](./docs/guides/baserow-docker-how-to.md)
|
||||
> section in the docker how to guide.
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/bram2w/baserow/tree/master)
|
||||
*Beta*
|
||||
|
|
3
dev.sh
3
dev.sh
|
@ -211,7 +211,8 @@ echo "./dev.sh running docker-compose commands:
|
|||
"
|
||||
|
||||
if [ "$down" = true ] ; then
|
||||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml down
|
||||
# Remove the containers and remove the anonymous volumes for cleanliness sake.
|
||||
docker-compose -f docker-compose.yml -f docker-compose.dev.yml rm -s -v -f
|
||||
fi
|
||||
|
||||
if [ "$kill" = true ] ; then
|
||||
|
|
|
@ -19,7 +19,6 @@ services:
|
|||
volumes:
|
||||
- ./backend:/baserow/backend
|
||||
- ./premium/backend/:/baserow/backend/plugins/premium
|
||||
- backend-dev-plugins:/baserow/backend/plugins
|
||||
# Open stdin and tty so when attaching key input works as expected.
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
@ -38,7 +37,6 @@ services:
|
|||
volumes:
|
||||
- ./backend:/baserow/backend
|
||||
- ./premium/backend/:/baserow/backend/plugins/premium
|
||||
- backend-dev-plugins:/baserow/backend/plugins
|
||||
# Open stdin and tty so when attaching key input works as expected.
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
@ -57,7 +55,6 @@ services:
|
|||
volumes:
|
||||
- ./backend:/baserow/backend
|
||||
- ./premium/backend/:/baserow/backend/plugins/premium
|
||||
- backend-dev-plugins:/baserow/backend/plugins
|
||||
# Open stdin and tty so when attaching key input works as expected.
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
@ -76,7 +73,6 @@ services:
|
|||
volumes:
|
||||
- ./backend:/baserow/backend
|
||||
- ./premium/backend/:/baserow/backend/plugins/premium
|
||||
- backend-dev-plugins:/baserow/backend/plugins
|
||||
# Open stdin and tty so when attaching key input works as expected.
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
@ -94,19 +90,10 @@ services:
|
|||
volumes:
|
||||
- ./web-frontend:/baserow/web-frontend
|
||||
- ./premium/web-frontend/:/baserow/web-frontend/plugins/premium
|
||||
- web-frontend-dev-node-modules:/baserow/web-frontend/node_modules
|
||||
- web-frontend-dev-plugins:/baserow/web-frontend/plugins
|
||||
|
||||
# Open stdin and tty so when attaching key input works as expected.
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
media-volume-fixer:
|
||||
command: chown ${UID:-1000}:${GID:-1000} -R /baserow/media
|
||||
|
||||
# Give names to the volumes declared in the docker dev images so we dont end up with hundreds
|
||||
# of anonymous volumes.
|
||||
volumes:
|
||||
web-frontend-dev-node-modules:
|
||||
web-frontend-dev-plugins:
|
||||
backend-dev-plugins:
|
||||
command: chown ${UID:-1000}:${GID:-1000} -R /baserow/media
|
|
@ -35,7 +35,7 @@ services:
|
|||
image: baserow_backend:latest
|
||||
environment:
|
||||
- PUBLIC_BACKEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:8000}
|
||||
- PUBLIC_WEB_FRONTEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:3000}
|
||||
- PUBLIC_WEB_FRONTEND_URL=${PUBLIC_WEB_FRONTEND_URL:-http://localhost:3000}
|
||||
- MIGRATE_ON_STARTUP=${MIGRATE_ON_STARTUP:-true}
|
||||
- SYNC_TEMPLATES_ON_STARTUP=${SYNC_TEMPLATES_ON_STARTUP:-true}
|
||||
- DATABASE_USER=${DATABASE_USER:-baserow}
|
||||
|
@ -139,7 +139,7 @@ services:
|
|||
image: baserow_web-frontend:latest
|
||||
environment:
|
||||
- PUBLIC_BACKEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:8000}
|
||||
- PUBLIC_WEB_FRONTEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:3000}
|
||||
- PUBLIC_WEB_FRONTEND_URL=${PUBLIC_WEB_FRONTEND_URL:-http://localhost:3000}
|
||||
- ADDITIONAL_MODULES
|
||||
ports:
|
||||
- "${HOST_PUBLISH_IP:-127.0.0.1}:${WEB_FRONTEND_PORT:-3000}:3000"
|
||||
|
|
|
@ -66,15 +66,27 @@ Baserow on your network.
|
|||
2. `PUBLIC_BACKEND_URL={REPLACE_WITH_YOUR_DOMAIN_NAME_OR_HOST_IP}:8000` - This will
|
||||
ensure that Baserow clients will be able to successfully connect to the backend,
|
||||
if you can visit Baserow at port `3000` but you are getting API errors please ensure
|
||||
this variable is set correctly.
|
||||
this variable is set correctly. If an IP address this must start with `http://` or
|
||||
`https://`.
|
||||
3. `PUBLIC_WEB_FRONTEND_URL={REPLACE_WITH_YOUR_DOMAIN_NAME_OR_HOST_IP}:3000` - The same
|
||||
variable as above but the URL for the web-frontend container instead.
|
||||
|
||||
For example you could run the command below after replacing `REPLACE_ME` with the
|
||||
IP address or domain name of the server where Baserow is running:
|
||||
Then you will need to go to `src/baserow/config/settings/base.py:16` and modify the
|
||||
`ALLOWED_HOSTS` variable to include the hostname or IP address of the server that
|
||||
Baserow will be running on (the hostname/ip you will be typing into the
|
||||
browser to access the site). For example adding a local network's IP would look like:
|
||||
```python
|
||||
ALLOWED_HOSTS = ["localhost", "192.168.0.194"]
|
||||
```
|
||||
|
||||
One way of setting the 3 environment variables is below. Please replease `REPLACE_ME`
|
||||
with the IP address or domain name of the server where Baserow is running. Ensure that
|
||||
you prepend IP addresses with `http://` as shown in the second command below.
|
||||
|
||||
```bash
|
||||
$ HOST_PUBLISH_IP=0.0.0.0 PUBLIC_BACKEND_URL=REPLACE_ME:8000 PUBLIC_WEB_FRONTEND_URL=REPLACE_ME:3000 docker-compose up
|
||||
$ HOST_PUBLISH_IP=0.0.0.0 PUBLIC_BACKEND_URL=REPLACE_ME:8000 PUBLIC_WEB_FRONTEND_URL=REPLACE_ME:3000 docker-compose up --build
|
||||
# For example running Baserow on a local network would look something like:
|
||||
$ HOST_PUBLISH_IP=0.0.0.0 PUBLIC_BACKEND_URL=http://192.168.0.194:8000 PUBLIC_WEB_FRONTEND_URL=http://192.168.0.194:3000 docker-compose up --build
|
||||
```
|
||||
|
||||
### Configure an external email server
|
||||
|
|
Loading…
Add table
Reference in a new issue