Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dull-parts-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baseplate-dev/sync': patch
---

Fix bug where overwrite was not overwriting noOverwrite files
15 changes: 15 additions & 0 deletions .changeset/move-docker-to-root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@baseplate-dev/project-builder-lib': patch
'@baseplate-dev/project-builder-server': patch
'@baseplate-dev/project-builder-web': patch
---

Move Docker Compose generation from backend to root package

Docker Compose configuration is now generated at the monorepo root instead of within individual backend packages. This provides a better developer experience with a single `docker compose up` command from the project root.

**Breaking Changes:**

- Docker files now generate at `docker/` (root) instead of `apps/backend/docker/`
- `enableRedis` removed from backend app configuration - moved to project-level infrastructure settings
- New Infrastructure settings page for configuring Redis (Postgres is always enabled)
5 changes: 5 additions & 0 deletions .changeset/move-redis-to-infrastructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baseplate-dev/project-builder-lib': patch
---

Add migration to move enableRedis from backend apps to infrastructure settings. Redis configuration is now stored at settings.infrastructure.redis.enabled instead of individual backend app settings, allowing for centralized infrastructure configuration across the monorepo.
2 changes: 1 addition & 1 deletion .github/workflows/lint-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:

- name: Run Docker setup
run: docker compose up -d
working-directory: examples/${{ matrix.example }}/apps/backend/docker
working-directory: examples/${{ matrix.example }}/docker

- name: Run prettier check
run: pnpm prettier:check
Expand Down
2 changes: 2 additions & 0 deletions examples/blog-with-auth/.baseplateignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/apps/**
/packages/**
20 changes: 17 additions & 3 deletions examples/blog-with-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ For detailed setup instructions and documentation specific to each application,
pnpm install
```

### 2. Configure Environment Variables
### 2. Start Infrastructure Services

Start Docker services (database, cache, etc.):

```bash
cd docker && docker compose up
```

This starts all required infrastructure services like PostgreSQL and Redis (if enabled).

### 3. Configure Environment Variables

Each application may require its own environment configuration. See the individual app READMEs in `apps/*/README.md` for specific setup instructions.

### 3. Additional Setup
### 4. Additional Setup

Some applications may require additional setup steps (database migrations, seeding, etc.). Refer to the individual app READMEs for details.

### 4. Start Development Servers
### 5. Start Development Servers

From the root directory:

Expand All @@ -45,6 +55,10 @@ This will start all applications concurrently.
Run these from the repository root:

```bash
# Infrastructure
cd docker && docker compose up # Start infrastructure services (database, etc.)
cd docker && docker compose down # Stop infrastructure services

# Development
pnpm dev # Start all apps in development mode

Expand Down
1 change: 1 addition & 0 deletions examples/blog-with-auth/apps/backend/.baseplateignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.seed.env
.env
2 changes: 1 addition & 1 deletion examples/blog-with-auth/apps/backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_ENVIRONMENT=dev
AUTH_SECRET=<AUTH_SECRET>
DATABASE_URL=postgres://postgres:blog-with-auth-backend-password@localhost:3432/postgres?schema=public
DATABASE_URL=postgres://postgres:blog-with-auth-password@localhost:3432/blog-with-auth?schema=public
SENTRY_DSN=
6 changes: 3 additions & 3 deletions examples/blog-with-auth/apps/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This project was generated by Baseplate.
In order to set up the backend, you must do the following steps:

1. **Prerequisites**: Ensure you have Docker and Node (ideally with [Mise](https://mise.sh), [Volta](https://volta.sh), or another version manager)
2. **Install dependencies**: `pnpm install`
3. **Spin up backend dependencies, e.g. database**: `cd apps/backend/docker && docker compose up`
2. **Install dependencies**: `pnpm install` (from repository root)
3. **Spin up infrastructure services**: `cd docker && docker compose up` (from repository root)
4. **Run database migrations and seed database with test data**: Run `pnpm prisma migrate dev` in the backend directory (`apps/backend`)

## Running Server

1. **Run Docker**: `cd docker && docker compose up`
1. **Run Docker**: `cd docker && docker compose up` (from repository root)
2. **Run Server**: `pnpm dev`
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"@baseplate-dev/core-generators#docker/docker-compose:docker-compose": "docker/docker-compose.yml",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env": "docker/.env",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env-example": "docker/.env.example",
"@baseplate-dev/core-generators#metadata/path-roots:path-roots": ".paths-metadata.json",
"@baseplate-dev/core-generators#node/eslint:eslint-config": "eslint.config.js",
"@baseplate-dev/core-generators#node/node-git-ignore:gitignore": ".gitignore",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_ENVIRONMENT=dev
AUTH_SECRET=<AUTH_SECRET>
DATABASE_URL=postgres://postgres:blog-with-auth-backend-password@localhost:3432/postgres?schema=public
DATABASE_URL=postgres://postgres:blog-with-auth-password@localhost:3432/blog-with-auth?schema=public
SENTRY_DSN=
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This project was generated by Baseplate.
In order to set up the backend, you must do the following steps:

1. **Prerequisites**: Ensure you have Docker and Node (ideally with [Mise](https://mise.sh), [Volta](https://volta.sh), or another version manager)
2. **Install dependencies**: `pnpm install`
3. **Spin up backend dependencies, e.g. database**: `cd apps/backend/docker && docker compose up`
2. **Install dependencies**: `pnpm install` (from repository root)
3. **Spin up infrastructure services**: `cd docker && docker compose up` (from repository root)
4. **Run database migrations and seed database with test data**: Run `pnpm prisma migrate dev` in the backend directory (`apps/backend`)

## Running Server

1. **Run Docker**: `cd docker && docker compose up`
1. **Run Docker**: `cd docker && docker compose up` (from repository root)
2. **Run Server**: `pnpm dev`

This file was deleted.

8 changes: 0 additions & 8 deletions examples/blog-with-auth/apps/backend/docker/.env.example

This file was deleted.

3 changes: 3 additions & 0 deletions examples/blog-with-auth/baseplate/file-id-map.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"@baseplate-dev/core-generators#docker/docker-compose:docker-compose": "docker/docker-compose.yml",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env": "docker/.env",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env-example": "docker/.env.example",
"@baseplate-dev/core-generators#metadata/path-roots:path-roots": ".paths-metadata.json",
"@baseplate-dev/core-generators#node/node-git-ignore:gitignore": ".gitignore",
"@baseplate-dev/core-generators#node/node:package-json": "package.json",
Expand Down
20 changes: 17 additions & 3 deletions examples/blog-with-auth/baseplate/generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ For detailed setup instructions and documentation specific to each application,
pnpm install
```

### 2. Configure Environment Variables
### 2. Start Infrastructure Services

Start Docker services (database, cache, etc.):

```bash
cd docker && docker compose up
```

This starts all required infrastructure services like PostgreSQL and Redis (if enabled).

### 3. Configure Environment Variables

Each application may require its own environment configuration. See the individual app READMEs in `apps/*/README.md` for specific setup instructions.

### 3. Additional Setup
### 4. Additional Setup

Some applications may require additional setup steps (database migrations, seeding, etc.). Refer to the individual app READMEs for details.

### 4. Start Development Servers
### 5. Start Development Servers

From the root directory:

Expand All @@ -45,6 +55,10 @@ This will start all applications concurrently.
Run these from the repository root:

```bash
# Infrastructure
cd docker && docker compose up # Start infrastructure services (database, etc.)
cd docker && docker compose down # Stop infrastructure services

# Development
pnpm dev # Start all apps in development mode

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Docker Compose Project Configuration
COMPOSE_PROJECT_NAME=blog-with-auth-dev

# PostgreSQL Configuration
POSTGRES_PORT=3432
POSTGRES_PASSWORD=blog-with-auth-password
POSTGRES_DB=blog-with-auth

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
db:
image: postgres:17.5-alpine
container_name: ${COMPOSE_PROJECT_NAME:-blog-with-auth-backend}-db
container_name: ${COMPOSE_PROJECT_NAME:-blog-with-auth}-db
restart: on-failure
security_opt:
- no-new-privileges:true
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-blog-with-auth-backend-password}
POSTGRES_DB: ${POSTGRES_DB:-blog-with-auth-backend}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-blog-with-auth-password}
POSTGRES_DB: ${POSTGRES_DB:-blog-with-auth}
POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=en_US.utf8'
ports:
- '${POSTGRES_PORT:-3432}:5432'
Expand All @@ -24,7 +24,7 @@ services:
test:
[
'CMD-SHELL',
'pg_isready -U postgres -d ${POSTGRES_DB:-blog-with-auth-backend}',
'pg_isready -U postgres -d ${POSTGRES_DB:-blog-with-auth}',
]
interval: 5s
timeout: 2s
Expand Down
4 changes: 2 additions & 2 deletions examples/blog-with-auth/baseplate/project-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"enableAxios": false,
"enableBullQueue": false,
"enablePostmark": false,
"enableRedis": false,
"enableStripe": false,
"enableSubscriptions": false,
"id": "app:acqRWBqOc6tx",
Expand Down Expand Up @@ -763,13 +762,14 @@
"version": "0.1.0"
}
],
"schemaVersion": 19,
"schemaVersion": 20,
"settings": {
"general": {
"name": "blog-with-auth",
"packageScope": "",
"portOffset": 3000
},
"infrastructure": { "redis": { "enabled": false } },
"templateExtractor": { "fileIdRegexWhitelist": "", "writeMetadata": true }
}
}
8 changes: 8 additions & 0 deletions examples/blog-with-auth/docker/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Docker Compose Project Configuration
COMPOSE_PROJECT_NAME=blog-with-auth-dev

# PostgreSQL Configuration
POSTGRES_PORT=3432
POSTGRES_PASSWORD=blog-with-auth-password
POSTGRES_DB=blog-with-auth

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
db:
image: postgres:17.5-alpine
container_name: ${COMPOSE_PROJECT_NAME:-blog-with-auth-backend}-db
container_name: ${COMPOSE_PROJECT_NAME:-blog-with-auth}-db
restart: on-failure
security_opt:
- no-new-privileges:true
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-blog-with-auth-backend-password}
POSTGRES_DB: ${POSTGRES_DB:-blog-with-auth-backend}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-blog-with-auth-password}
POSTGRES_DB: ${POSTGRES_DB:-blog-with-auth}
POSTGRES_INITDB_ARGS: '--encoding=UTF8 --locale=en_US.utf8'
ports:
- '${POSTGRES_PORT:-3432}:5432'
Expand All @@ -24,7 +24,7 @@ services:
test:
[
'CMD-SHELL',
'pg_isready -U postgres -d ${POSTGRES_DB:-blog-with-auth-backend}',
'pg_isready -U postgres -d ${POSTGRES_DB:-blog-with-auth}',
]
interval: 5s
timeout: 2s
Expand Down
2 changes: 2 additions & 0 deletions examples/todo-with-auth0/.baseplateignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/apps/**
/packages/**
20 changes: 17 additions & 3 deletions examples/todo-with-auth0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ For detailed setup instructions and documentation specific to each application,
pnpm install
```

### 2. Configure Environment Variables
### 2. Start Infrastructure Services

Start Docker services (database, cache, etc.):

```bash
cd docker && docker compose up
```

This starts all required infrastructure services like PostgreSQL and Redis (if enabled).

### 3. Configure Environment Variables

Each application may require its own environment configuration. See the individual app READMEs in `apps/*/README.md` for specific setup instructions.

### 3. Additional Setup
### 4. Additional Setup

Some applications may require additional setup steps (database migrations, seeding, etc.). Refer to the individual app READMEs for details.

### 4. Start Development Servers
### 5. Start Development Servers

From the root directory:

Expand All @@ -45,6 +55,10 @@ This will start all applications concurrently.
Run these from the repository root:

```bash
# Infrastructure
cd docker && docker compose up # Start infrastructure services (database, etc.)
cd docker && docker compose down # Stop infrastructure services

# Development
pnpm dev # Start all apps in development mode

Expand Down
1 change: 1 addition & 0 deletions examples/todo-with-auth0/apps/backend/.baseplateignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
4 changes: 2 additions & 2 deletions examples/todo-with-auth0/apps/backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AUTH0_CLIENT_ID=<AUTH0_CLIENT_ID>
AUTH0_CLIENT_SECRET=<AUTH0_CLIENT_SECRET>
AUTH0_DOMAIN=<AUTH0_DOMAIN>
AUTH0_TENANT_DOMAIN=<AUTH0_TENANT_DOMAIN>
DATABASE_URL=postgres://postgres:todo-with-auth0-backend-password@localhost:6432/postgres?schema=public
DATABASE_URL=postgres://postgres:todo-with-auth0-password@localhost:6432/todo-with-auth0?schema=public
POSTMARK_API_TOKEN=POSTMARK_API_TOKEN
REDIS_URL=redis://:todo-with-auth0-backend-password@localhost:6379
REDIS_URL=redis://:todo-with-auth0-password@localhost:6379
SENTRY_DSN=
6 changes: 3 additions & 3 deletions examples/todo-with-auth0/apps/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This project was generated by Baseplate.
In order to set up the backend, you must do the following steps:

1. **Prerequisites**: Ensure you have Docker and Node (ideally with [Mise](https://mise.sh), [Volta](https://volta.sh), or another version manager)
2. **Install dependencies**: `pnpm install`
3. **Spin up backend dependencies, e.g. database**: `cd apps/backend/docker && docker compose up`
2. **Install dependencies**: `pnpm install` (from repository root)
3. **Spin up infrastructure services**: `cd docker && docker compose up` (from repository root)
4. **Run database migrations and seed database with test data**: Run `pnpm prisma migrate dev` in the backend directory (`apps/backend`)

## Running Server

1. **Run Docker**: `cd docker && docker compose up`
1. **Run Docker**: `cd docker && docker compose up` (from repository root)
2. **Run Server**: `pnpm dev`
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"@baseplate-dev/core-generators#docker/docker-compose:docker-compose": "docker/docker-compose.yml",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env": "docker/.env",
"@baseplate-dev/core-generators#docker/docker-compose:docker-env-example": "docker/.env.example",
"@baseplate-dev/core-generators#metadata/path-roots:path-roots": ".paths-metadata.json",
"@baseplate-dev/core-generators#node/eslint:eslint-config": "eslint.config.js",
"@baseplate-dev/core-generators#node/node-git-ignore:gitignore": ".gitignore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AUTH0_CLIENT_ID=<AUTH0_CLIENT_ID>
AUTH0_CLIENT_SECRET=<AUTH0_CLIENT_SECRET>
AUTH0_DOMAIN=<AUTH0_DOMAIN>
AUTH0_TENANT_DOMAIN=<AUTH0_TENANT_DOMAIN>
DATABASE_URL=postgres://postgres:todo-with-auth0-backend-password@localhost:6432/postgres?schema=public
DATABASE_URL=postgres://postgres:todo-with-auth0-password@localhost:6432/todo-with-auth0?schema=public
POSTMARK_API_TOKEN=POSTMARK_API_TOKEN
REDIS_URL=redis://:todo-with-auth0-backend-password@localhost:6379
REDIS_URL=redis://:todo-with-auth0-password@localhost:6379
SENTRY_DSN=
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ This project was generated by Baseplate.
In order to set up the backend, you must do the following steps:

1. **Prerequisites**: Ensure you have Docker and Node (ideally with [Mise](https://mise.sh), [Volta](https://volta.sh), or another version manager)
2. **Install dependencies**: `pnpm install`
3. **Spin up backend dependencies, e.g. database**: `cd apps/backend/docker && docker compose up`
2. **Install dependencies**: `pnpm install` (from repository root)
3. **Spin up infrastructure services**: `cd docker && docker compose up` (from repository root)
4. **Run database migrations and seed database with test data**: Run `pnpm prisma migrate dev` in the backend directory (`apps/backend`)

## Running Server

1. **Run Docker**: `cd docker && docker compose up`
1. **Run Docker**: `cd docker && docker compose up` (from repository root)
2. **Run Server**: `pnpm dev`
Loading