mirror of
https://github.com/immich-app/immich.git
synced 2024-12-22 01:47:08 +02:00
feat: create immich-nginx container to remove default nginx config setup (#280)
* feat: create immich-proxy container to remove default nginx config setup * infra: make production docker-compose point at release builds for stability * Fixed nginx config file was overriden by default.conf in nginx container; Fixed docker-compose.dev; Added additional tag 'release' for tagging after release build in Github Action Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
a2e1d4caa2
commit
142ede350e
27
.github/workflows/build_push_docker_latest.yml
vendored
27
.github/workflows/build_push_docker_latest.yml
vendored
@ -91,3 +91,30 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
altran1502/immich-web:latest
|
altran1502/immich-web:latest
|
||||||
|
|
||||||
|
build_and_push_nginx_latest:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.0.0
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and Push Proxy
|
||||||
|
uses: docker/build-push-action@v3.0.0
|
||||||
|
with:
|
||||||
|
context: ./nginx
|
||||||
|
file: ./nginx/Dockerfile
|
||||||
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
altran1502/immich-proxy:latest
|
||||||
|
27
.github/workflows/build_push_docker_staging.yml
vendored
27
.github/workflows/build_push_docker_staging.yml
vendored
@ -93,3 +93,30 @@ jobs:
|
|||||||
push: ${{ github.event_name == 'pull_request' }}
|
push: ${{ github.event_name == 'pull_request' }}
|
||||||
tags: |
|
tags: |
|
||||||
altran1502/immich-web:staging
|
altran1502/immich-web:staging
|
||||||
|
|
||||||
|
build_and_push_nginx_staging:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.0.0
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and Push Proxy
|
||||||
|
uses: docker/build-push-action@v3.0.0
|
||||||
|
with:
|
||||||
|
context: ./nginx
|
||||||
|
file: ./nginx/Dockerfile
|
||||||
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name == 'pull_request' }}
|
||||||
|
tags: |
|
||||||
|
altran1502/immich-proxy:staging
|
42
.github/workflows/build_push_server_release.yml
vendored
42
.github/workflows/build_push_server_release.yml
vendored
@ -43,6 +43,7 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: |
|
tags: |
|
||||||
altran1502/immich-server:${{ steps.previoustag.outputs.tag }}
|
altran1502/immich-server:${{ steps.previoustag.outputs.tag }}
|
||||||
|
altran1502/immich-server:release
|
||||||
|
|
||||||
build_and_push_machine_learning_release:
|
build_and_push_machine_learning_release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -75,6 +76,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
altran1502/immich-machine-learning:${{ steps.previoustag.outputs.tag }}
|
altran1502/immich-machine-learning:${{ steps.previoustag.outputs.tag }}
|
||||||
|
altran1502/immich-machine-learning:release
|
||||||
|
|
||||||
build_and_push_web_release:
|
build_and_push_web_release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -114,3 +116,43 @@ jobs:
|
|||||||
target: prod
|
target: prod
|
||||||
tags: |
|
tags: |
|
||||||
altran1502/immich-web:${{ steps.previoustag.outputs.tag }}
|
altran1502/immich-web:${{ steps.previoustag.outputs.tag }}
|
||||||
|
altran1502/immich-web:release
|
||||||
|
|
||||||
|
build_and_push_nginx_release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: "main"
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: "Get Previous tag"
|
||||||
|
id: previoustag
|
||||||
|
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||||
|
with:
|
||||||
|
fallback: latest
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2.0.0
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push immich-proxy release
|
||||||
|
uses: docker/build-push-action@v3.0.0
|
||||||
|
with:
|
||||||
|
context: ./web
|
||||||
|
file: ./web/Dockerfile
|
||||||
|
platforms: linux/arm/v7,linux/amd64,linux/arm64
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: |
|
||||||
|
altran1502/immich-proxy:release
|
||||||
|
altran1502/immich-proxy:${{ steps.previoustag.outputs.tag }}
|
||||||
|
@ -7,8 +7,6 @@ services:
|
|||||||
context: ../server
|
context: ../server
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
command: npm run start:dev immich
|
command: npm run start:dev immich
|
||||||
expose:
|
|
||||||
- "3000"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../server:/usr/src/app
|
- ../server:/usr/src/app
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
@ -27,8 +25,6 @@ services:
|
|||||||
context: ../machine-learning
|
context: ../machine-learning
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
command: npm run start:dev
|
command: npm run start:dev
|
||||||
expose:
|
|
||||||
- "3001"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../machine-learning:/usr/src/app
|
- ../machine-learning:/usr/src/app
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
@ -94,11 +90,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
nginx:
|
immich-proxy:
|
||||||
container_name: proxy_nginx
|
container_name: immich_proxy
|
||||||
image: nginx:latest
|
image: immich-proxy-dev:latest
|
||||||
volumes:
|
build:
|
||||||
- ./settings/nginx-conf:/etc/nginx/conf.d
|
context: ../nginx
|
||||||
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 2283:80
|
- 2283:80
|
||||||
- 2284:443
|
- 2284:443
|
||||||
@ -106,6 +103,7 @@ services:
|
|||||||
driver: none
|
driver: none
|
||||||
depends_on:
|
depends_on:
|
||||||
- immich-server
|
- immich-server
|
||||||
|
restart: always
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
@ -68,11 +68,9 @@ services:
|
|||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
nginx:
|
immich-proxy:
|
||||||
container_name: proxy_nginx
|
container_name: immich_proxy
|
||||||
image: nginx:latest
|
image: altran1502/immich-proxy:staging
|
||||||
volumes:
|
|
||||||
- ./settings/nginx-conf:/etc/nginx/conf.d
|
|
||||||
ports:
|
ports:
|
||||||
- 2283:80
|
- 2283:80
|
||||||
- 2284:443
|
- 2284:443
|
||||||
|
@ -2,7 +2,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
immich-server:
|
immich-server:
|
||||||
image: altran1502/immich-server:latest
|
image: altran1502/immich-server:release
|
||||||
entrypoint: ["/bin/sh", "./start-server.sh"]
|
entrypoint: ["/bin/sh", "./start-server.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
@ -16,7 +16,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
immich-microservices:
|
immich-microservices:
|
||||||
image: altran1502/immich-server:latest
|
image: altran1502/immich-server:release
|
||||||
entrypoint: ["/bin/sh", "./start-microservices.sh"]
|
entrypoint: ["/bin/sh", "./start-microservices.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
@ -30,7 +30,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
immich-machine-learning:
|
immich-machine-learning:
|
||||||
image: altran1502/immich-machine-learning:latest
|
image: altran1502/immich-machine-learning:release
|
||||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
- ${UPLOAD_LOCATION}:/usr/src/app/upload
|
||||||
@ -43,7 +43,7 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
immich-web:
|
immich-web:
|
||||||
image: altran1502/immich-web:latest
|
image: altran1502/immich-web:release
|
||||||
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
entrypoint: ["/bin/sh", "./entrypoint.sh"]
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@ -68,11 +68,9 @@ services:
|
|||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
nginx:
|
immich-proxy:
|
||||||
container_name: proxy_nginx
|
container_name: immich_proxy
|
||||||
image: nginx:latest
|
image: altran1502/immich-proxy:release
|
||||||
volumes:
|
|
||||||
- ./settings/nginx-conf:/etc/nginx/conf.d
|
|
||||||
ports:
|
ports:
|
||||||
- 2283:80
|
- 2283:80
|
||||||
- 2284:443
|
- 2284:443
|
||||||
|
3
nginx/Dockerfile
Normal file
3
nginx/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:latest
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
Loading…
Reference in New Issue
Block a user