[Enhancement] Better docker compose deployment. #50

Closed
opened 2026-02-04 16:59:55 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @ma-karai on GitHub (Apr 5, 2022).

Enhancement for easy deployment

Firstly amazing development! Really great stuff

As far as I can see, to update my current installation I have to pull the repository again and rebuild the images and then redeploy, which I admit is quite easy. However, to set up automated image builds on hub.docker.com is also quite straightforward and would reduce the clutter on my (selfish) hard drives quite significantly. I am sure other agree as well.

It would be nice if immich_server and immich_microservices would be available on docker hub, and docker compose would be provided that I dont have to build.

Kind Regards
Mak

Originally created by @ma-karai on GitHub (Apr 5, 2022). **Enhancement for easy deployment** Firstly amazing development! Really great stuff As far as I can see, to update my current installation I have to pull the repository again and rebuild the images and then redeploy, which I admit is quite easy. However, to set up automated image builds on hub.docker.com is also quite straightforward and would reduce the clutter on my (selfish) hard drives quite significantly. I am sure other agree as well. It would be nice if **immich_server** and **immich_microservices** would be available on docker hub, and docker compose would be provided that I dont have to build. Kind Regards Mak
Author
Owner

@alextran1502 commented on GitHub (Apr 5, 2022):

Hi @ma-karai

I am planning to work on this as well, haven't gotten a chance to get around it yet. I will update this issue once I have the auto-tagging docker image pipeline sorted out.

@alextran1502 commented on GitHub (Apr 5, 2022): Hi @ma-karai I am planning to work on this as well, haven't gotten a chance to get around it yet. I will update this issue once I have the auto-tagging docker image pipeline sorted out.
Author
Owner

@ma-karai commented on GitHub (Apr 5, 2022):

Outstanding :)

@ma-karai commented on GitHub (Apr 5, 2022): Outstanding :)
Author
Owner

@alextran1502 commented on GitHub (Apr 5, 2022):

I've managed to whip up a Github workflow for pushing the images to Dockerhub.

You can try it out

@alextran1502 commented on GitHub (Apr 5, 2022): I've managed to whip up a Github workflow for pushing the images to Dockerhub. You can try it out * [immich-microservices](https://hub.docker.com/repository/docker/altran1502/immich-microservices) * [immich-server](https://hub.docker.com/repository/docker/altran1502/immich-server)
Author
Owner

@ma-karai commented on GitHub (Apr 6, 2022):

Works like a charm!

file structure needed: (only the nginx config, and the env file)
image

and the simple docker compose file

version: "3.8"

services:
  immich_server:
    image: altran1502/immich-server:latest
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    #ports:
     # - 3000:3000
    depends_on:
      - redis
      - database
    networks:
      - immich_network
    restart: unless-stopped

  immich_microservices:
    image: altran1502/immich-microservices:latest
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    #ports:
     # - 3001:3001
    depends_on:
      - database
    networks:
      - immich_network
    restart: unless-stopped

  redis:
    container_name: immich_redis
    image: redis:6.2
    networks:
      - immich_network

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    ports:
      - 5432:5432
    networks:
      - immich_network

  nginx:
    container_name: proxy_nginx
    image: nginx:latest
    volumes:
      - ./nginx-conf:/etc/nginx/conf.d
    ports:
      - 2283:80
      - 2284:443
    logging:
      driver: none
    networks:
      - immich_network
    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:
@ma-karai commented on GitHub (Apr 6, 2022): Works like a charm! file structure needed: (only the nginx config, and the env file) ![image](https://user-images.githubusercontent.com/17119942/161986270-bfaa70cb-46b4-4286-bc33-3b48aeccb87c.png) and the simple docker compose file ``` version: "3.8" services: immich_server: image: altran1502/immich-server:latest entrypoint: ["/bin/sh", "./entrypoint.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production #ports: # - 3000:3000 depends_on: - redis - database networks: - immich_network restart: unless-stopped immich_microservices: image: altran1502/immich-microservices:latest entrypoint: ["/bin/sh", "./entrypoint.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production #ports: # - 3001:3001 depends_on: - database networks: - immich_network restart: unless-stopped redis: container_name: immich_redis image: redis:6.2 networks: - immich_network database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - ./pgdata:/var/lib/postgresql/data ports: - 5432:5432 networks: - immich_network nginx: container_name: proxy_nginx image: nginx:latest volumes: - ./nginx-conf:/etc/nginx/conf.d ports: - 2283:80 - 2284:443 logging: driver: none networks: - immich_network 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: ```
Author
Owner

@alextran1502 commented on GitHub (Apr 6, 2022):

I am glad it works for you! Please reopen this issue if you have any additional suggestions :) I will integrate this to the upstream setup

@alextran1502 commented on GitHub (Apr 6, 2022): I am glad it works for you! Please reopen this issue if you have any additional suggestions :) I will integrate this to the upstream setup
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#50