mirror of
https://github.com/immich-app/immich.git
synced 2024-12-22 01:47:08 +02:00
fix(web): auto generate open api build (#6561)
* fix: autogen typescript-sdk/build * chore: refactor script
This commit is contained in:
parent
e4277128be
commit
42d208859e
@ -54,11 +54,10 @@ services:
|
||||
|
||||
immich-web:
|
||||
container_name: immich_web
|
||||
image: immich-web-dev:1.9.0
|
||||
image: immich-web-dev:latest
|
||||
build:
|
||||
context: ../web
|
||||
dockerfile: Dockerfile
|
||||
command: "node ./node_modules/.bin/vite dev --host 0.0.0.0 --port 3000"
|
||||
command: "/usr/src/app/bin/immich-web"
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
|
@ -34,15 +34,13 @@ All the services are packaged to run as with single Docker Compose command.
|
||||
1. Clone the project repo.
|
||||
2. Run `cp docker/example.env docker/.env`.
|
||||
3. Edit `docker/.env` to provide values for the required variable `UPLOAD_LOCATION`.
|
||||
4. Install the required dependencies (nodejs >20, a modern java version e.g. OpenJDK 17)
|
||||
5. From the root directory, run:
|
||||
4. From the root directory, run:
|
||||
|
||||
```bash title="Start development server"
|
||||
make open-api # this is the only step that requires the above dependencies
|
||||
make dev # required Makefile installed on the system.
|
||||
```
|
||||
|
||||
6. Access the dev instance in your browser at http://localhost:2283, or connect via the mobile app.
|
||||
5. Access the dev instance in your browser at http://localhost:2283, or connect via the mobile app.
|
||||
|
||||
All the services will be started with hot-reloading enabled for a quick feedback loop.
|
||||
|
||||
|
@ -8,4 +8,3 @@ COPY --chown=node:node . .
|
||||
ENV CHOKIDAR_USEPOLLING=true
|
||||
EXPOSE 24678
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
13
web/bin/immich-web
Executable file
13
web/bin/immich-web
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
TYPESCRIPT_SDK=/usr/src/open-api/typescript-sdk
|
||||
|
||||
if [ ! -d "$TYPESCRIPT_SDK/build" ]; then
|
||||
echo "$TYPESCRIPT_SDK/build does not exist, building"
|
||||
npm --prefix "$TYPESCRIPT_SDK" install
|
||||
npm --prefix "$TYPESCRIPT_SDK" run build
|
||||
else
|
||||
echo "$TYPESCRIPT_SDK/build exists, skipping"
|
||||
fi
|
||||
|
||||
node ./node_modules/.bin/vite dev --host 0.0.0.0 --port 3000
|
Loading…
Reference in New Issue
Block a user