fix: IndeedHub demo builds via git clone in Dockerfile
No submodule needed — the Dockerfile clones the IndeedHub repo directly during build. Works with Portainer without any manual steps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
02264a572f
commit
3461c97fcd
@ -38,144 +38,14 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
# ══════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════
|
||||||
# IndeedHub — Built from submodule (indeedhub/)
|
# IndeedHub — Built from Dockerfile bundled in this repo
|
||||||
# ══════════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
indeedhub:
|
indeedhub:
|
||||||
build:
|
build:
|
||||||
context: ./indeedhub
|
context: ./indeedhub-demo
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
|
||||||
VITE_USE_MOCK_DATA: "false"
|
|
||||||
VITE_INDEEHUB_API_URL: /api
|
|
||||||
VITE_INDEEHUB_CDN_URL: /storage
|
|
||||||
VITE_NOSTR_RELAYS: ""
|
|
||||||
container_name: indeedhub
|
container_name: indeedhub
|
||||||
ports:
|
ports:
|
||||||
- "7777:7777"
|
- "7777:7777"
|
||||||
depends_on:
|
|
||||||
- indeedhub-api
|
|
||||||
- indeedhub-relay
|
|
||||||
networks:
|
|
||||||
- default
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
indeedhub-api:
|
|
||||||
build:
|
|
||||||
context: ./indeedhub/backend
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: indeedhub-api
|
|
||||||
environment:
|
|
||||||
ENVIRONMENT: production
|
|
||||||
PORT: 4000
|
|
||||||
DOMAIN: ${DOMAIN:-localhost}
|
|
||||||
FRONTEND_URL: ${FRONTEND_URL:-http://localhost:7777}
|
|
||||||
DATABASE_HOST: indeedhub-postgres
|
|
||||||
DATABASE_PORT: 5432
|
|
||||||
DATABASE_USER: indeedhub
|
|
||||||
DATABASE_PASSWORD: indeedhub
|
|
||||||
DATABASE_NAME: indeedhub
|
|
||||||
QUEUE_HOST: indeedhub-redis
|
|
||||||
QUEUE_PORT: 6379
|
|
||||||
S3_ENDPOINT: http://indeedhub-minio:9000
|
|
||||||
AWS_REGION: us-east-1
|
|
||||||
AWS_ACCESS_KEY: minioadmin
|
|
||||||
AWS_SECRET_KEY: minioadmin
|
|
||||||
S3_PRIVATE_BUCKET_NAME: indeedhub-private
|
|
||||||
S3_PUBLIC_BUCKET_NAME: indeedhub-public
|
|
||||||
S3_PUBLIC_BUCKET_URL: /storage
|
|
||||||
NOSTR_JWT_SECRET: demo-jwt-secret-change-in-production
|
|
||||||
NOSTR_JWT_EXPIRES_IN: 7d
|
|
||||||
AES_MASTER_SECRET: demo-aes-secret-change-in-production
|
|
||||||
depends_on:
|
|
||||||
indeedhub-postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
indeedhub-redis:
|
|
||||||
condition: service_started
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4000/nostr-auth/health"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 5
|
|
||||||
start_period: 60s
|
|
||||||
|
|
||||||
indeedhub-postgres:
|
|
||||||
image: postgres:16-alpine
|
|
||||||
container_name: indeedhub-postgres
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: indeedhub
|
|
||||||
POSTGRES_PASSWORD: indeedhub
|
|
||||||
POSTGRES_DB: indeedhub
|
|
||||||
volumes:
|
|
||||||
- indeedhub-pgdata:/var/lib/postgresql/data
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "pg_isready -U indeedhub"]
|
|
||||||
interval: 10s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
start_period: 30s
|
|
||||||
|
|
||||||
indeedhub-redis:
|
|
||||||
image: redis:7-alpine
|
|
||||||
container_name: indeedhub-redis
|
|
||||||
command: redis-server --appendonly yes
|
|
||||||
volumes:
|
|
||||||
- indeedhub-redis:/data
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
indeedhub-minio:
|
|
||||||
image: minio/minio:latest
|
|
||||||
container_name: indeedhub-minio
|
|
||||||
command: server /data --console-address ":9001"
|
|
||||||
environment:
|
|
||||||
MINIO_ROOT_USER: minioadmin
|
|
||||||
MINIO_ROOT_PASSWORD: minioadmin
|
|
||||||
volumes:
|
|
||||||
- indeedhub-minio:/data
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
indeedhub-minio-init:
|
|
||||||
image: minio/mc:latest
|
|
||||||
container_name: indeedhub-minio-init
|
|
||||||
depends_on:
|
|
||||||
- indeedhub-minio
|
|
||||||
entrypoint: >
|
|
||||||
/bin/sh -c "
|
|
||||||
sleep 5;
|
|
||||||
mc alias set local http://indeedhub-minio:9000 minioadmin minioadmin;
|
|
||||||
mc mb local/indeedhub-private --ignore-existing;
|
|
||||||
mc mb local/indeedhub-public --ignore-existing;
|
|
||||||
mc anonymous set download local/indeedhub-public;
|
|
||||||
"
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: "no"
|
|
||||||
|
|
||||||
indeedhub-relay:
|
|
||||||
image: scsibug/nostr-rs-relay:latest
|
|
||||||
container_name: indeedhub-relay
|
|
||||||
volumes:
|
|
||||||
- indeedhub-relay:/usr/src/app/db
|
|
||||||
networks:
|
|
||||||
- indeedhub
|
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
networks:
|
|
||||||
indeedhub:
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
indeedhub-pgdata:
|
|
||||||
indeedhub-redis:
|
|
||||||
indeedhub-minio:
|
|
||||||
indeedhub-relay:
|
|
||||||
|
|||||||
19
indeedhub-demo/Dockerfile
Normal file
19
indeedhub-demo/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# IndeedHub demo — clone, build, and serve in one step
|
||||||
|
# No submodule or local source needed
|
||||||
|
FROM node:20-alpine AS builder
|
||||||
|
RUN apk add --no-cache git
|
||||||
|
WORKDIR /app
|
||||||
|
RUN git clone --depth 1 https://git.tx1138.com/lfg2025/indeehub.git .
|
||||||
|
RUN npm ci
|
||||||
|
ENV VITE_USE_MOCK_DATA=false
|
||||||
|
ENV VITE_INDEEHUB_API_URL=/api
|
||||||
|
ENV VITE_INDEEHUB_CDN_URL=/storage
|
||||||
|
ENV VITE_NOSTR_RELAYS=""
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
RUN apk add --no-cache curl
|
||||||
|
COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 7777
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Loading…
x
Reference in New Issue
Block a user