Testing
This commit is contained in:
19
.devcontainer/server/.env
Normal file
19
.devcontainer/server/.env
Normal file
@@ -0,0 +1,19 @@
|
||||
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
|
||||
|
||||
# The location where your uploaded files are stored
|
||||
UPLOAD_LOCATION=upload-volume
|
||||
|
||||
# The location where your database files are stored
|
||||
DB_DATA_LOCATION=db-volume
|
||||
|
||||
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
||||
# TZ=Etc/UTC
|
||||
|
||||
# Connection secret for postgres. You should change it to a random password
|
||||
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
|
||||
DB_PASSWORD=postgres
|
||||
|
||||
# The values below this line do not need to be changed
|
||||
###################################################################################
|
||||
DB_USERNAME=postgres
|
||||
DB_DATABASE_NAME=immich
|
||||
8
.devcontainer/server/Dockerfile
Normal file
8
.devcontainer/server/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
ARG BASEIMAGE=ghcr.io/immich-app/base-server-dev:202503182202@sha256:45ae044b64a7b518f8d94fa4de718090c1c7689d516ac2ac0976a5331eaeb396
|
||||
FROM ${BASEIMAGE} AS dev
|
||||
|
||||
RUN apt-get install inetutils-ping sudo
|
||||
RUN usermod -aG sudo node
|
||||
# RUN echo "node:pass" | chpasswd
|
||||
# RUN echo "root:root" | chpasswd
|
||||
RUN echo "node ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
29
.devcontainer/server/devcontainer.json
Normal file
29
.devcontainer/server/devcontainer.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "Immich - Backend and Frontend",
|
||||
"service": "immich-server",
|
||||
"dockerComposeFile": ["docker-compose.yml"],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"svelte.svelte-vscode",
|
||||
"ms-vscode-remote.remote-containers",
|
||||
"foxundermoon.shell-format",
|
||||
"timonwong.shellcheck",
|
||||
"rvest.vs-code-prettier-eslint",
|
||||
"bluebrown.yamlfmt",
|
||||
"vkrishna04.cspell-sync"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/nvidia-cuda:1": {},
|
||||
"ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {}
|
||||
},
|
||||
"forwardPorts": [3000],
|
||||
"overrideCommand": true,
|
||||
"workspaceFolder": "/immich",
|
||||
"remoteUser": "node",
|
||||
"postCreateCommand": "/immich/.devcontainer/scripts/installAndRun.sh"
|
||||
}
|
||||
53
.devcontainer/server/docker-compose.yml
Normal file
53
.devcontainer/server/docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
services:
|
||||
immich-server:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
hostname: immich
|
||||
extra_hosts:
|
||||
- 'host.docker.internal:host-gateway'
|
||||
environment:
|
||||
- IMMICH_SERVER_URL=http://127.0.0.1:2283/
|
||||
volumes:
|
||||
- ../..:/immich
|
||||
- cli_node_modules:/immich/cli/node_modules
|
||||
- e2e_node_modules:/immich/e2e/node_modules
|
||||
- open_api_node_modules:/immich/open-api/typescript-sdk/node_modules
|
||||
- server_node_modules:/immich/server/node_modules
|
||||
- web_node_modules:/immich/web/node_modules
|
||||
# - immich:/immich
|
||||
- ${UPLOAD_LOCATION}:/immich/server/upload
|
||||
|
||||
redis:
|
||||
image: redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
|
||||
healthcheck:
|
||||
test: redis-cli ping || exit 1
|
||||
|
||||
database:
|
||||
image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_USER: ${DB_USERNAME}
|
||||
POSTGRES_DB: ${DB_DATABASE_NAME}
|
||||
POSTGRES_INITDB_ARGS: '--data-checksums'
|
||||
volumes:
|
||||
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
healthcheck:
|
||||
test: >-
|
||||
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
|
||||
interval: 5m
|
||||
start_interval: 30s
|
||||
start_period: 5m
|
||||
command: >-
|
||||
postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
|
||||
|
||||
volumes:
|
||||
cli_node_modules:
|
||||
e2e_node_modules:
|
||||
open_api_node_modules:
|
||||
server_node_modules:
|
||||
web_node_modules:
|
||||
immich:
|
||||
Reference in New Issue
Block a user