AFFiNE on CasaOs? #10205
Unanswered
ronaldohoch
asked this question in
Q&A
AFFiNE on CasaOs?
#10205
Replies: 3 comments 2 replies
|
Is it possible your database is failing to start. You could try starting just the database and see that it is at least starting. Or you could use an external database at least that is what I usually do. |
1 reply
0 replies
|
This works in ZimaOS networks:
affine_network:
name: affine_affine_network
driver: bridge
ipam: {}
external: false
services:
affine:
command: null
container_name: affine
depends_on:
affine_migration:
condition: service_completed_successfully
required: true
postgres:
condition: service_healthy
required: true
redis:
condition: service_healthy
required: true
deploy:
resources:
limits:
memory: 4GB
cpus: "2"
reservations:
memory: 256MB
cpus: "0.00"
placement: {}
entrypoint: null
environment:
DATABASE_URL: postgresql://affine@postgres:5432/affine
REDIS_SERVER_HOST: redis
image: ghcr.io/toeverything/affine:stable
labels:
icon: https://Zimaos.hsinghhira.me/apps/com.hiraappstore.affine/assets/icon.png
networks:
- affine_network
ports:
- mode: ingress
target: 3010
published: "3010"
protocol: tcp
restart: unless-stopped
stop_grace_period: 40s
volumes:
- type: bind
source: /DATA/AppData/affine/storage
target: /root/.affine/storage
bind:
create_host_path: true
- type: bind
source: /DATA/AppData/affine/config
target: /root/.affine/config
bind:
create_host_path: true
affine_migration:
command:
- sh
- -c
- node ./scripts/self-host-predeploy.js
container_name: affine_migration
depends_on:
postgres:
condition: service_healthy
required: true
redis:
condition: service_healthy
required: true
deploy:
resources:
limits:
memory: 1GB
cpus: "1.00"
reservations:
memory: 256MB
cpus: "0.00"
placement: {}
entrypoint: null
environment:
AFFINE_INDEXER_ENABLED: "false"
DATABASE_URL: postgresql://affine@postgres:5432/affine
REDIS_SERVER_HOST: redis
image: ghcr.io/toeverything/affine:stable
labels:
icon: https://Zimaos.hsinghhira.me/apps/com.hiraappstore.affine/assets/icon.png
networks:
- affine_network
restart: no
stop_grace_period: 40s
volumes:
- type: bind
source: /DATA/AppData/affine/storage
target: /root/.affine/storage
bind:
create_host_path: true
- type: bind
source: /DATA/AppData/affine/config
target: /root/.affine/config
bind:
create_host_path: true
postgres:
command: null
container_name: affine_postgres
deploy:
resources:
limits:
memory: 1GB
cpus: "1.00"
reservations:
memory: 256MB
cpus: "0.00"
placement: {}
entrypoint: null
environment:
POSTGRES_DB: affine
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_INITDB_ARGS: "'--data-checksums'"
POSTGRES_USER: affine
healthcheck:
test:
- CMD-SHELL
- pg_isready -U affine -d affine
timeout: 5s
interval: 10s
retries: 5
image: pgvector/pgvector:pg16
labels:
icon: https://Zimaos.hsinghhira.me/apps/com.hiraappstore.affine/assets/icon.png
networks:
- affine_network
restart: unless-stopped
stop_grace_period: 1m0s
volumes:
- type: bind
source: /DATA/AppData/affine/postgres
target: /var/lib/postgresql/data
bind:
create_host_path: true
redis:
command: null
container_name: affine_redis
deploy:
resources:
limits:
memory: 256MB
cpus: "0.50"
reservations:
memory: 256MB
cpus: "0.00"
placement: {}
entrypoint: null
healthcheck:
test:
- CMD
- redis-cli
- ping
timeout: 5s
interval: 10s
retries: 5
image: redis:7-alpine
labels:
icon: https://Zimaos.hsinghhira.me/apps/com.hiraappstore.affine/assets/icon.png
networks:
- affine_network
restart: unless-stopped
stop_grace_period: 40s
volumes: []
x-casaos:
hostname: ""
icon: https://Zimaos.hsinghhira.me/apps/com.hiraappstore.affine/assets/icon.png
id: com.hiraappstore.affine
index: /
is_uncontrolled: false
main: affine
port_map: "3010"
repo_id: com.hiraappstore.zimaappstore
scheme: http
store_app_id: affine
title:
custom: AFFiNE
en_US: AFFiNE |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi guys, has anyone here managed to install AFFiNE on CasaOs?
https://docs.affine.pro/docs/self-host-affine
It has a step-by-step guide, using docker-compose, but I still can't get it to work.
I've been fixing the problems via the container logs, but I haven't been able to get it to connect to Affine's postgres.
edit:
This is my docker-compos with some changes with help of chatgpt:
Docker-compose:
The log from container:
All reactions