Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.95 KB
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 1.95 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
# Common development tasks. Run `make` for the list.
#
# The three run targets are meant to be started in separate terminals: `make dev-env` holds the
# containers the other two talk to, and both `make server` and `make webui` stay in the foreground
# so that they pick up code changes.
# Postgres, the Valkey cluster with its admin UI, and Silo. Elasticsearch is deliberately absent:
# the dev profile searches the database instead (ovsx.databasesearch.enabled).
DEV_PROFILES := db valkey valkey-admin silo
.DEFAULT_GOAL := help
.PHONY: help dev-env dev-env-down server webui code-server code-server-staging code-server-production
help: ## Show the available targets
@grep -hE '^[a-z][a-z-]*:.*## ' $(MAKEFILE_LIST) \
| sort \
| awk -F ':.*## ' '{ printf " %-24s %s\n", $$1, $$2 }'
dev-env: ## Start the containers the server and web UI need (Ctrl-C stops them)
docker compose $(addprefix --profile ,$(DEV_PROFILES)) up
dev-env-down: ## Stop those containers and remove them
docker compose $(addprefix --profile ,$(DEV_PROFILES)) down
server: ## Run the registry server on http://localhost:8080
cd server && ./scripts/generate-properties.sh && ./gradlew runServer
webui: ## Run the web UI on http://localhost:3000
cd webui && yarn install --immutable && yarn dev
# VS Code in the browser on http://localhost:8085. Switching registry recreates the container, so
# extensions installed in it go. CODE_SERVER_GALLERY_URL points `make code-server` anywhere else.
CODE_SERVER := docker compose --profile vscode up --attach code-server
code-server: ## Run VS Code in the browser on http://localhost:8085, using the local registry
$(CODE_SERVER)
code-server-staging: ## Run VS Code in the browser on http://localhost:8085, using staging.open-vsx.org
CODE_SERVER_GALLERY_URL=https://staging.open-vsx.org $(CODE_SERVER)
code-server-production: ## Run VS Code in the browser on http://localhost:8085, using open-vsx.org
CODE_SERVER_GALLERY_URL=https://open-vsx.org $(CODE_SERVER)