mirror of
https://github.com/immich-app/immich.git
synced 2024-12-22 01:47:08 +02:00
Update production dockerfile for a cleaner look (#86)
This commit is contained in:
parent
23ba651705
commit
fccdbdd66a
@ -1,10 +1,6 @@
|
|||||||
name: Build Server
|
name: Build Server - Latest
|
||||||
|
|
||||||
on:
|
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:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
40
.github/workflows/build_push_server_release.yml
vendored
Normal file
40
.github/workflows/build_push_server_release.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Build Server - Release
|
||||||
|
|
||||||
|
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}}
|
5
Makefile
5
Makefile
@ -2,7 +2,10 @@ dev:
|
|||||||
docker-compose -f ./docker/docker-compose.dev.yml up --remove-orphans
|
docker-compose -f ./docker/docker-compose.dev.yml up --remove-orphans
|
||||||
|
|
||||||
dev-update:
|
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:
|
dev-scale:
|
||||||
docker-compose -f ./docker/docker-compose.dev.yml up --build -V --scale immich_server=3 --remove-orphans
|
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
|
@ -7,12 +7,11 @@ services:
|
|||||||
context: ../server
|
context: ../server
|
||||||
dockerfile: ../server/Dockerfile
|
dockerfile: ../server/Dockerfile
|
||||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||||
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- "3000"
|
- "3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ../server:/usr/src/app
|
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
- /usr/src/app/node_modules
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
@ -29,12 +28,11 @@ services:
|
|||||||
context: ../microservices
|
context: ../microservices
|
||||||
dockerfile: ../microservices/Dockerfile
|
dockerfile: ../microservices/Dockerfile
|
||||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||||
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- "3001"
|
- "3001"
|
||||||
volumes:
|
volumes:
|
||||||
- ../microservices:/usr/src/app
|
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
- /usr/src/app/node_modules
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
@ -83,27 +81,6 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- immich_server
|
- 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:
|
networks:
|
||||||
immich_network:
|
immich_network:
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -2,7 +2,7 @@ name: immich_mobile
|
|||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
|
|
||||||
publish_to: "none"
|
publish_to: "none"
|
||||||
version: 1.4.0+0
|
version: 1.4.0+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.15.1 <3.0.0"
|
sdk: ">=2.15.1 <3.0.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user