1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-02-14 08:58:56 +00:00
bramw_baserow/docker-compose.dev.yml

164 lines
5.2 KiB
YAML

version: "3.4"
services:
db:
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:${POSTGRES_PORT:-5432}:5432"
redis:
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:${REDIS_PORT:-6379}:6379"
# Override with the dev caddy file which switches Caddy to only be the media file
# server in the dev env. Devs will instead directly connect to the backend and
# web frontend services.
caddy:
volumes:
- $PWD/Caddyfile.dev:/etc/caddy/Caddyfile
backend:
image: baserow_backend_dev:latest
environment:
- BASEROW_BACKEND_DEBUGGER_ENABLED=${BASEROW_BACKEND_DEBUGGER_ENABLED:-True}
- BASEROW_BACKEND_DEBUGGER_PORT=${BASEROW_BACKEND_DEBUGGER_PORT:-5678}
build:
dockerfile: ./backend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:8000:8000"
- "${HOST_PUBLISH_IP:-127.0.0.1}:${BASEROW_BACKEND_DEBUGGER_PORT:-5678}:${BASEROW_BACKEND_DEBUGGER_PORT:-5678}"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
web-frontend:
image: baserow_web-frontend_dev:latest
build:
dockerfile: ./web-frontend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
ports:
- "${HOST_PUBLISH_IP:-127.0.0.1}:3000:3000"
volumes:
- ./web-frontend:/baserow/web-frontend
# Override the above mounts for node_modules so we use the node_modules built
# directly into the image instead of whatever is on your local filesystem.
- /baserow/web-frontend/node_modules
- ./premium/web-frontend/:/baserow/premium/web-frontend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
celery:
image: baserow_backend_dev:latest
build:
dockerfile: ./backend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
command: "watch-py celery-worker"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
celery-export-worker:
image: baserow_backend_dev:latest
build:
dockerfile: ./backend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
command: "watch-py celery-exportworker"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
celery-beat-worker:
image: baserow_backend_dev:latest
build:
dockerfile: ./backend/Dockerfile
context: .
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
command: "watch-py celery-beat"
volumes:
- ./backend:/baserow/backend
- ./premium/backend/:/baserow/premium/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
mjml-email-compiler:
build:
target: dev
args:
# We allow configuring the UID/GID here so you can run as the dev's actual user
# reducing the chance the containers screw up the bind mounted folders.
UID: $UID
GID: $GID
context: .
dockerfile: ./web-frontend/Dockerfile
healthcheck:
test: [ "CMD-SHELL", "exit 0" ]
image: baserow_web-frontend:latest
command: "bash -c 'cd /baserow/backend/email_compiler/ && yarn install && yarn run watch'"
volumes:
- ./backend:/baserow/backend
# Open stdin and tty so when attaching key input works as expected.
stdin_open: true
tty: true
mailhog:
image: mailhog/mailhog
logging:
driver: 'none' # disable saving logs
ports:
- "8025:8025" # web ui
networks:
local:
# When switching between dev and local the media files in the media volume will be
# owned by different users. Ensure that we chown them to the user appropriate for the
# environment here.
volume-permissions-fixer:
image: bash:4.4
command: chown ${UID:-1000}:${GID:-1000} -R /baserow/media
volumes:
- media:/baserow/media
- caddy_config:/config
- caddy_data:/data
networks:
local: