Skip to content

Commit e25988e

Browse files
authored
chore: switch to uv and justfile (baserow#4369)
* create backend justfile; switch to uv * Add deploy and dc-deploy recipes to build images * Add uv.lock for reproducible builds * CI fixes + improvements * Reduce build time * improve CI caching * Improve exit early conditions * Set requires_python==3.11.*; add backend/media to gitignore * Fix all-in-one Dockerfiles and some other fixes * Introduce frontend justfile + some other useful recipes * Fix permissions issue with dev containers * Improve dockerfiles and docs on how to use the dev env * Fix mjml-email-compiler service * Update docs + address feedback * Fix containers healthchecks * Fix yarn test in dev container * Minor fixes to docs and justfile attach command * Address Petr's feedback * Address additional feedback * Add changelog entry * Address feedback: Petr and Przemek * address feedback + prepare for saas PR * minor fixes * Address Bram's feedback 2
1 parent 0ad6100 commit e25988e

File tree

78 files changed

+19186
-8567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+19186
-8567
lines changed

.dockerignore

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
**/.nuxt
2+
**/.nuxt-storybook
3+
**/.storybook
24
**/node_modules
5+
**/.cache
6+
web-frontend/reports/
7+
8+
**/.venv/
9+
**/.ruff_cache
310
**/.pytest_cache
11+
**/__pycache__
12+
**/*.pyc
13+
**/*.pyo
14+
backend/reports/
15+
backend/src/baserow.egg-info
16+
backend/media/
17+
418
*.iml
519
.idea/
20+
.vscode/
621
.local/
7-
web-frontend/reports/
8-
backend/reports/
9-
backend/src/baserow.egg-info
22+
.git/
23+
**/.claude/
24+
**/.gitignore
25+
**/Dockerfile
26+
**/docker-compose*.yml

.env.dev.example

Lines changed: 0 additions & 43 deletions
This file was deleted.

.env.docker-dev.example

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Docker development environment for Baserow
2+
# Used by: just dc-dev (docker-compose.dev.yml)
3+
#
4+
# This file is auto-created from .env.docker-dev.example when you run `just dc-dev`.
5+
# For native local development (without Docker), use .env.local instead.
6+
#
7+
# DO NOT USE THIS FILE IN PRODUCTION.
8+
9+
# Compose profiles to enable. By default, all services including optional ones
10+
# (storybook, flower) are started. Set to empty to disable optional services.
11+
# See: https://docs.docker.com/compose/how-tos/profiles/
12+
COMPOSE_PROFILES=optional
13+
14+
SECRET_KEY=baserow
15+
DATABASE_PASSWORD=baserow
16+
REDIS_PASSWORD=baserow
17+
18+
# Do not edit the following override, it is required to work with docker-compose.dev.yml.
19+
BASEROW_PUBLIC_URL=
20+
PRIVATE_BACKEND_URL=http://backend:8000
21+
22+
# In the Dev environment we set the next two variables to force the Caddy reverse proxy
23+
# onto an unused port. We only want to use Caddy to serve media files and not act
24+
# as a reverse proxy between your browser and Baserow.
25+
WEB_FRONTEND_PORT=4000
26+
WEB_FRONTEND_SSL_PORT=4443
27+
28+
PUBLIC_BACKEND_URL=http://localhost:8000
29+
PUBLIC_WEB_FRONTEND_URL=http://localhost:3000
30+
# If you change WEB_FRONTEND_PORT above you also need the change the 4000 here to match.
31+
MEDIA_URL=http://localhost:4000/media/
32+
33+
# Optional PostgreSQL config for better performance (must be single line in .env files)
34+
POSTGRES_DEV_EXTRA_ARGS=-c shared_buffers=512MB -c fsync=off -c full_page_writes=off -c synchronous_commit=off -c max_locks_per_transaction=512 -c logging_collector=off -c log_statement=none -c log_duration=off -c log_min_duration_statement=-1 -c log_checkpoints=off -c log_connections=off -c log_disconnections=off -c log_lock_waits=off -c log_temp_files=-1 -c checkpoint_timeout=1h -c max_wal_size=10GB -c min_wal_size=1GB -c wal_level=minimal -c max_wal_senders=0 -c autovacuum=off -c random_page_cost=1.0 -c effective_io_concurrency=200 -c work_mem=256MB -c maintenance_work_mem=512MB
35+
36+
37+
POSTGRES_IMAGE_VERSION=13
38+
39+
# Settings for local dev with MinIO to have local s3-like object storage
40+
# AWS_ACCESS_KEY_ID=<REDACTED>
41+
# AWS_SECRET_ACCESS_KEY=<REDACTED>
42+
# AWS_STORAGE_BUCKET_NAME=baserow
43+
# AWS_S3_ENDPOINT_URL=http://YOUR_LOCAL_IP:9000
44+
# AWS_S3_USE_SSL=off
45+
# AWS_S3_CUSTOM_DOMAIN=
46+
# AWS_DEFAULT_ACL=
47+
# AWS_S3_VERIFY=off
48+
# AWS_S3_SIGNATURE_VERSION = 's3v4'
49+
# AWS_S3_ADDRESSING_STYLE = 'path'

.env.local.example

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Local development environment for Baserow
2+
# Copy this file to .env.local and adjust as needed
3+
#
4+
# This file is for running Baserow OUTSIDE of Docker (native Python/Node).
5+
# For Docker development, use .env.dev.example instead.
6+
#
7+
# =============================================================================
8+
# Django Settings
9+
# =============================================================================
10+
DJANGO_SETTINGS_MODULE=baserow.config.settings.dev
11+
# For running tests:
12+
# DJANGO_SETTINGS_MODULE=baserow.config.settings.test
13+
14+
# =============================================================================
15+
# Security (use simple values for local dev only!)
16+
# =============================================================================
17+
SECRET_KEY=local-dev-secret-key-not-for-production
18+
BASEROW_JWT_SIGNING_KEY=local-dev-jwt-key-not-for-production
19+
20+
# =============================================================================
21+
# Database (local PostgreSQL)
22+
# =============================================================================
23+
DATABASE_HOST=localhost
24+
DATABASE_PORT=5432
25+
DATABASE_NAME=baserow
26+
DATABASE_USER=baserow
27+
DATABASE_PASSWORD=baserow
28+
# speed up operations and tests (must be single line, quoted for bash sourcing)
29+
POSTGRES_DEV_EXTRA_ARGS="-c shared_buffers=512MB -c fsync=off -c full_page_writes=off -c synchronous_commit=off -c max_locks_per_transaction=512 -c logging_collector=off -c log_statement=none -c log_duration=off -c log_min_duration_statement=-1 -c log_checkpoints=off -c log_connections=off -c log_disconnections=off -c log_lock_waits=off -c log_temp_files=-1 -c checkpoint_timeout=1h -c max_wal_size=10GB -c min_wal_size=1GB -c wal_level=minimal -c max_wal_senders=0 -c autovacuum=off -c random_page_cost=1.0 -c effective_io_concurrency=200 -c work_mem=256MB -c maintenance_work_mem=512MB"
30+
31+
# Or use a connection URL:
32+
# DATABASE_URL=postgresql://baserow:baserow@localhost:5432/baserow
33+
34+
# =============================================================================
35+
# Redis (local Redis)
36+
# =============================================================================
37+
REDIS_HOST=localhost
38+
REDIS_PORT=6379
39+
REDIS_PASSWORD=baserow
40+
41+
# =============================================================================
42+
# URLs
43+
# =============================================================================
44+
BASEROW_PUBLIC_URL=
45+
PUBLIC_BACKEND_URL=http://localhost:8000
46+
PUBLIC_WEB_FRONTEND_URL=http://localhost:3000
47+
PRIVATE_BACKEND_URL=http://localhost:8000
48+
49+
# =============================================================================
50+
# Backend Development Settings
51+
# =============================================================================
52+
BASEROW_BACKEND_DEBUG=on
53+
BASEROW_BACKEND_LOG_LEVEL=INFO
54+
55+
# Disable template sync on startup for faster boot
56+
SYNC_TEMPLATES_ON_STARTUP=false
57+
MIGRATE_ON_STARTUP=false
58+
59+
# =============================================================================
60+
# Optional: Email (use console backend for local dev)
61+
# =============================================================================
62+
# EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
63+
64+
# =============================================================================
65+
# Optional: Celery
66+
# =============================================================================
67+
# Run celery tasks synchronously (no separate worker needed)
68+
# CELERY_TASK_ALWAYS_EAGER=true
69+
70+
# =============================================================================
71+
# Media files (path relative to the backend folder)
72+
# =============================================================================
73+
MEDIA_ROOT=./media
74+
MEDIA_URL=http://localhost:8000/media/

0 commit comments

Comments
 (0)