From a71545aada929222c60211e97f48e3655ae99fa6 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Mon, 28 Mar 2022 23:37:04 -0500 Subject: [PATCH 1/6] Clean up docker-compose file --- Makefile | 5 ++++- docker/docker-compose.yml | 27 ++------------------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index aad773297eb76..767b9e2feec87 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,10 @@ dev: docker-compose -f ./docker/docker-compose.dev.yml up --remove-orphans dev-update: - docker-compose -f ./docker/docker-compose.dev.yml up --build -V --remove-orphans + docker-compose -f ./docker/docker-compose.dev.yml up --build -V --remove-orphans dev-scale: docker-compose -f ./docker/docker-compose.dev.yml up --build -V --scale immich_server=3 --remove-orphans + +prod: + docker-compose -f ./docker/docker-compose.yml up --build -V --remove-orphans \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ce43d4c8bf547..4df5d4c750e5d 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -7,12 +7,11 @@ services: context: ../server dockerfile: ../server/Dockerfile entrypoint: ["/bin/sh", "./entrypoint.sh"] + restart: unless-stopped expose: - "3000" volumes: - - ../server:/usr/src/app - ${UPLOAD_LOCATION}:/usr/src/app/upload - - /usr/src/app/node_modules env_file: - .env environment: @@ -29,12 +28,11 @@ services: context: ../microservices dockerfile: ../microservices/Dockerfile entrypoint: ["/bin/sh", "./entrypoint.sh"] + restart: unless-stopped expose: - "3001" volumes: - - ../microservices:/usr/src/app - ${UPLOAD_LOCATION}:/usr/src/app/upload - - /usr/src/app/node_modules env_file: - .env environment: @@ -83,27 +81,6 @@ services: depends_on: - immich_server - # immich_tf_fastapi: - # container_name: immich_tf_fastapi - # image: tensor_flow_fastapi:1.0.0 - # restart: always - # command: uvicorn app.main:app --proxy-headers --host 0.0.0.0 --port 8000 --reload - # build: - # context: ../machine_learning - # target: cpu - # dockerfile: ../machine_learning/Dockerfile - # volumes: - # - ../machine_learning/app:/code/app - # - ${UPLOAD_LOCATION}:/code/app/upload - # ports: - # - 2285:8000 - # expose: - # - "8000" - # depends_on: - # - database - # networks: - # - immich_network - networks: immich_network: volumes: From 0a015ccc24813257d3cb7aad295a630edf4e64c8 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Tue, 29 Mar 2022 00:26:14 -0500 Subject: [PATCH 2/6] Rename github action workflow --- .../{build_push_server.yml => build_push_server_latest.yml} | 2 -- 1 file changed, 2 deletions(-) rename .github/workflows/{build_push_server.yml => build_push_server_latest.yml} (97%) diff --git a/.github/workflows/build_push_server.yml b/.github/workflows/build_push_server_latest.yml similarity index 97% rename from .github/workflows/build_push_server.yml rename to .github/workflows/build_push_server_latest.yml index 0d248ed5e92fd..435384664bdc6 100644 --- a/.github/workflows/build_push_server.yml +++ b/.github/workflows/build_push_server_latest.yml @@ -8,8 +8,6 @@ on: workflow_dispatch: push: branches: [main] - pull_request: - branches: [main] jobs: buildandpush: From 6eb90e864bdaeb3950db0a3d14df9cf93fdfa653 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Tue, 29 Mar 2022 00:28:30 -0500 Subject: [PATCH 3/6] Added release workflow --- .../workflows/build_push_server_release.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build_push_server_release.yml diff --git a/.github/workflows/build_push_server_release.yml b/.github/workflows/build_push_server_release.yml new file mode 100644 index 0000000000000..61fe7be7bd6d3 --- /dev/null +++ b/.github/workflows/build_push_server_release.yml @@ -0,0 +1,40 @@ +name: Build Server + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + buildandpush: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "main" # branch + # https://github.com/docker/setup-qemu-action#usage + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + # https://github.com/marketplace/actions/docker-setup-buildx + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1.6.0 + # https://github.com/docker/login-action#docker-hub + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # https://github.com/docker/build-push-action#multi-platform-image + - name: Build and push Immich + uses: docker/build-push-action@v2.10.0 + with: + context: ./server + file: ./server/Dockerfile + #platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6 + platforms: linux/arm/v7,linux/amd64,linux/arm64 + pull: true + push: true + tags: | + altran1502/immich-server:${{github.ref_name}} From adc2df7a596284010bb76789075d6c0021f336c2 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Tue, 29 Mar 2022 00:29:32 -0500 Subject: [PATCH 4/6] change workflow name --- .github/workflows/build_push_server_latest.yml | 6 +----- .github/workflows/build_push_server_release.yml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_push_server_latest.yml b/.github/workflows/build_push_server_latest.yml index 435384664bdc6..65ab89e5e8dbb 100644 --- a/.github/workflows/build_push_server_latest.yml +++ b/.github/workflows/build_push_server_latest.yml @@ -1,10 +1,6 @@ -name: Build Server +name: Build Server - Latest on: - # Triggers the workflow on push or pull request events but only for the main branch - #schedule: - # * is a special character in YAML so you have to quote this string - #- cron: '0 0 * * *' workflow_dispatch: push: branches: [main] diff --git a/.github/workflows/build_push_server_release.yml b/.github/workflows/build_push_server_release.yml index 61fe7be7bd6d3..d77dbbe051cc5 100644 --- a/.github/workflows/build_push_server_release.yml +++ b/.github/workflows/build_push_server_release.yml @@ -1,4 +1,4 @@ -name: Build Server +name: Build Server - Release on: workflow_dispatch: From d01537f8858855c0f0fa0fd74b881137ce09d36d Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Tue, 29 Mar 2022 00:39:34 -0500 Subject: [PATCH 5/6] Added back pull-request trigger for latest check --- .github/workflows/build_push_server_latest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_push_server_latest.yml b/.github/workflows/build_push_server_latest.yml index 65ab89e5e8dbb..aabf7d556b4d1 100644 --- a/.github/workflows/build_push_server_latest.yml +++ b/.github/workflows/build_push_server_latest.yml @@ -4,6 +4,8 @@ on: workflow_dispatch: push: branches: [main] + pull_request: + branches: [main] jobs: buildandpush: From 548096d758a9a14aa1555d33031425962bd730c8 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Tue, 29 Mar 2022 08:55:40 -0500 Subject: [PATCH 6/6] Added pubspec.yaml build VersionCode for F-droid --- mobile/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 7e10f8b270d94..6ba29316fcc30 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -2,7 +2,7 @@ name: immich_mobile description: A new Flutter project. publish_to: "none" -version: 1.4.0+0 +version: 1.4.0+6 environment: sdk: ">=2.15.1 <3.0.0"