Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Better docker compose deployment. #109

Closed
ma-karai opened this issue Apr 5, 2022 · 5 comments
Closed

[Enhancement] Better docker compose deployment. #109

ma-karai opened this issue Apr 5, 2022 · 5 comments

Comments

@ma-karai
Copy link

ma-karai commented 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

@alextran1502
Copy link
Contributor

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.

@ma-karai
Copy link
Author

ma-karai commented Apr 5, 2022

Outstanding :)

@alextran1502
Copy link
Contributor

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

You can try it out

@ma-karai
Copy link
Author

ma-karai commented 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:

@alextran1502
Copy link
Contributor

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants