-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.dev.yml
More file actions
107 lines (102 loc) · 3.66 KB
/
Copy pathci.dev.yml
File metadata and controls
107 lines (102 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Codesphere landscape — DEV stage.
#
# TanStack Start app (demo-app) plus a managed Postgres provider and an Adminer
# container, all in the same landscape.
#
# This is a genuine development environment, not a smaller production one: the
# run stage starts the Vite dev server, so editing a file in the Cloud IDE hot-
# reloads the running Landscape with no redeploy. Consequently there is no build
# step here — see ci.qa.yml for the production path.
#
# install -> typecheck -> test -> migrate -> seed -> vite dev
#
# The prepare stage is still the fast gate: a broken commit never reaches deploy.
# Secrets come from the workspace vault; per-stage coordinates come from
# Codesphere runtime templates.
schemaVersion: v0.4
prepare:
steps:
- command: corepack enable
- command: corepack prepare pnpm@9.15.9 --activate
- command: pnpm install --frozen-lockfile
- command: pnpm --dir demo-app typecheck
- command: pnpm --dir demo-app test
# No build: the dev server compiles on demand and watches for changes.
# Required by the v0.4 schema even though nothing runs here. Tests live in
# prepare — see docs/one-loop.md, Phase 4.
test:
steps: []
run:
postgres:
provider:
name: postgres
schemaVersion: v1
plan:
id: 0
parameters:
storage: 2048
cpu: 1
memory: 512
config:
version: "17.9"
userName: demo_app
databaseName: demo_app
secrets:
userPassword: ${{ vault.POSTGRES_PASSWORD }}
superuserPassword: ${{ vault.POSTGRES_SUPERUSER_PASSWORD }}
web:
healthEndpoint: tcp://localhost:3000
# plan is instance-specific, but 101 is used by both the learning platform
# and the Mealie reference config. Verify against the target instance.
plan: 101
replicas: 1
network:
ports:
- port: 3000
isPublic: false
paths:
- port: 3000
path: /
env:
APP_BASE_URL: https://${{ workspace.devDomain }}
# Constructed from the service key under run: (the trailing -postgres).
# Rename the postgres service above and this changes with it.
POSTGRES_HOST: ms-postgres-v1-${{ team.id }}-landscape-${{ workspace.id }}-postgres.ms-postgres.svc.cluster.local
POSTGRES_PORT: "5432"
POSTGRES_USER: demo_app
POSTGRES_PASSWORD: ${{ vault.POSTGRES_PASSWORD }}
POSTGRES_DB: demo_app
# The switch. start-app.sh reads this to choose the Vite dev server over
# the built Nitro output, and vite.config.ts derives HMR settings from
# APP_BASE_URL being an https gateway origin.
NODE_ENV: development
PORT: "3000"
volumeMounts:
- name: _workspace
mountPath: /home/user/app
workspacePath: ""
steps:
# SEED_DEV=1 inserts two reference messages on start.
- command: SEED_DEV=1 bash infrastructure/codesphere/start-app.sh
adminer:
# `image` selects the base image; `steps` is still what runs. Every service
# needs steps + healthEndpoint, image-based or not.
image: adminer:4
# http:// rather than tcp:// — a TCP probe opens and drops the socket every
# 10s, which PHP logs as "Closed without sending a request" and which proves
# nothing about whether Adminer actually serves. Matches the Mealie config.
healthEndpoint: http://localhost:8080/
steps:
- command: php -S 0.0.0.0:8080 -t /var/www/html
plan: 101
replicas: 1
network:
ports:
- port: 8080
isPublic: false
paths:
- port: 8080
path: /db
stripPath: true
env:
ADMINER_DEFAULT_SERVER: ms-postgres-v1-${{ team.id }}-landscape-${{ workspace.id }}-postgres.ms-postgres.svc.cluster.local