Skip to content

Commit 417606f

Browse files
mcarbonneyosit
authored andcommitted
feat: add minimal devcontainer setup (immich-app#14038)
* add minimal devcontainer setup * fix Makefile & update doc * fix Makefile * add warning regarding devcontainer + add newline at EOF
1 parent e827385 commit 417606f

File tree

4 files changed

+34
-10
lines changed

4 files changed

+34
-10
lines changed

Diff for: .devcontainer/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ARG BASEIMAGE=mcr.microsoft.com/devcontainers/typescript-node:22
2+
FROM ${BASEIMAGE}

Diff for: .devcontainer/devcontainer.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Immich devcontainers",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"BASEIMAGE": "mcr.microsoft.com/devcontainers/typescript-node:22"
7+
}
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"svelte.svelte-vscode"
13+
]
14+
}
15+
},
16+
"forwardPorts": [],
17+
"postCreateCommand": "make install-all",
18+
"remoteUser": "node"
19+
}
20+

Diff for: Makefile

+8-10
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ attach-server:
3939
renovate:
4040
LOG_LEVEL=debug npx renovate --platform=local --repository-cache=reset
4141

42-
MODULES = e2e server web cli sdk
42+
MODULES = e2e server web cli sdk docs
4343

4444
audit-%:
4545
npm --prefix $(subst sdk,open-api/typescript-sdk,$*) audit fix
@@ -48,11 +48,9 @@ install-%:
4848
build-cli: build-sdk
4949
build-web: build-sdk
5050
build-%: install-%
51-
npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run | grep 'build' >/dev/null \
52-
&& npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run build || true
51+
npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run build
5352
format-%:
54-
npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run | grep 'format:fix' >/dev/null \
55-
&& npm --prefix $(subst sdk,open-api/typescript-sdk,$*) run format:fix || true
53+
npm --prefix $* run format:fix
5654
lint-%:
5755
npm --prefix $* run lint:fix
5856
check-%:
@@ -79,14 +77,14 @@ test-medium:
7977
test-medium-dev:
8078
docker exec -it immich_server /bin/sh -c "npm run test:medium"
8179

82-
build-all: $(foreach M,$(MODULES),build-$M) ;
80+
build-all: $(foreach M,$(filter-out e2e,$(MODULES)),build-$M) ;
8381
install-all: $(foreach M,$(MODULES),install-$M) ;
84-
check-all: $(foreach M,$(MODULES),check-$M) ;
85-
lint-all: $(foreach M,$(MODULES),lint-$M) ;
86-
format-all: $(foreach M,$(MODULES),format-$M) ;
82+
check-all: $(foreach M,$(filter-out sdk cli docs,$(MODULES)),check-$M) ;
83+
lint-all: $(foreach M,$(filter-out sdk docs,$(MODULES)),lint-$M) ;
84+
format-all: $(foreach M,$(filter-out sdk,$(MODULES)),format-$M) ;
8785
audit-all: $(foreach M,$(MODULES),audit-$M) ;
8886
hygiene-all: lint-all format-all check-all sql audit-all;
89-
test-all: $(foreach M,$(MODULES),test-$M) ;
87+
test-all: $(foreach M,$(filter-out sdk docs,$(MODULES)),test-$M) ;
9088

9189
clean:
9290
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

Diff for: docs/docs/developer/pr-checklist.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# PR Checklist
22

3+
A minimal devcontainer is supplied with this repository. All commands can be executed directly inside this container to avoid tedious installation of the environment.
4+
:::warning
5+
The provided devcontainer isn't complete at the moment. At least all dockerized steps in the Makefile won't work (`make dev`, ....). Feel free to contribute!
6+
:::
37
When contributing code through a pull request, please check the following:
48

59
## Web Checks

0 commit comments

Comments
 (0)