+41
-1
@@ -1,4 +1,28 @@
|
|||||||
services:
|
services:
|
||||||
|
init:
|
||||||
|
image: busybox:1.37.0
|
||||||
|
user: root:root
|
||||||
|
command: /init.sh
|
||||||
|
restart: no
|
||||||
|
network_mode: none
|
||||||
|
volumes:
|
||||||
|
- ./init.sh:/init.sh:ro
|
||||||
|
# Used for resolving user and group names within the init script
|
||||||
|
- /etc/passwd:/etc/passwd:ro
|
||||||
|
- /etc/group:/etc/group:ro
|
||||||
|
# Mount all named volumes so they can be initialised
|
||||||
|
- minio_data:/minio_data:rw
|
||||||
|
- museum_data:/museum_data:rw
|
||||||
|
- postgres_data:/postgres_data:rw
|
||||||
|
# Temporary mounts for migrating data
|
||||||
|
- /mnt/ente_1/minio_data:/minio_data_old:ro
|
||||||
|
- /mnt/ente_1/museum_data:/museum_data_old:ro
|
||||||
|
- /mnt/ente_1/postgres_data:/postgres_data_old:ro
|
||||||
|
labels:
|
||||||
|
diun.enable: "true"
|
||||||
|
diun.watch_repo: "true"
|
||||||
|
diun.include_tags: "latest"
|
||||||
|
|
||||||
museum:
|
museum:
|
||||||
container_name: ente_museum
|
container_name: ente_museum
|
||||||
image: ghcr.io/ente-io/server:927c6a316f181c7901446311f0085593b346b336
|
image: ghcr.io/ente-io/server:927c6a316f181c7901446311f0085593b346b336
|
||||||
@@ -11,6 +35,9 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 8080:8080 # API
|
- 8080:8080 # API
|
||||||
depends_on:
|
depends_on:
|
||||||
|
init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
restart: true
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
@@ -68,6 +95,10 @@ services:
|
|||||||
image: postgres:15
|
image: postgres:15
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: 2008:2008 # ente:ente
|
user: 2008:2008 # ente:ente
|
||||||
|
depends_on:
|
||||||
|
init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
restart: true
|
||||||
networks:
|
networks:
|
||||||
- ente_network
|
- ente_network
|
||||||
secrets:
|
secrets:
|
||||||
@@ -94,11 +125,15 @@ services:
|
|||||||
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
|
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: 2008:2008 # ente:ente
|
user: 2008:2008 # ente:ente
|
||||||
|
depends_on:
|
||||||
|
init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
restart: true
|
||||||
networks:
|
networks:
|
||||||
- ente_network
|
- ente_network
|
||||||
ports:
|
ports:
|
||||||
- 3200:3200 # MinIO API
|
- 3200:3200 # MinIO API
|
||||||
# Uncomment to enable MinIO Web UI
|
# Uncomment to enable MinIO Web UI
|
||||||
# - 3201:3201
|
# - 3201:3201
|
||||||
secrets:
|
secrets:
|
||||||
- minio_root_user
|
- minio_root_user
|
||||||
@@ -131,6 +166,11 @@ services:
|
|||||||
diun.watch_repo: "true"
|
diun.watch_repo: "true"
|
||||||
diun.include_tags: "latest"
|
diun.include_tags: "latest"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
minio_data:
|
||||||
|
museum_data:
|
||||||
|
postgres_data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
ente_network:
|
ente_network:
|
||||||
name: ente_network
|
name: ente_network
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Define a helper function that runs a command
|
||||||
|
# If the command fails, the script prints an error message
|
||||||
|
# and exits immediately.
|
||||||
|
run() {
|
||||||
|
# "$@" expands to all arguments passed to this function
|
||||||
|
# and preserves proper word splitting and quoting.
|
||||||
|
"$@" || {
|
||||||
|
echo "Error: command failed: $*" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
run chown ente:ente /minio_data
|
||||||
|
run chown ente:ente /museum_data
|
||||||
|
run chown ente:ente /postgres_data
|
||||||
|
|
||||||
Reference in New Issue
Block a user