Commit 65e88f44 authored by Andreas Düren's avatar Andreas Düren
Browse files

Update Cloudron app configuration and setup

parent 05a0b42b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@
  "tagline": "Open Source End-to-End Encrypted Photos & Authentication",
  "upstreamVersion": "1.0.0",
  "version": "1.0.0",
  "healthCheckPath": "/",
  "httpPort": 8080,
  "healthCheckPath": "/healthcheck",
  "httpPort": 3080,
  "memoryLimit": 1073741824,
  "addons": {
    "localstorage": {},
@@ -18,6 +18,12 @@
      "supportsDisplayName": true
    }
  },
  "checklist": {
    "create-permanent-admin": {
      "message": "Required: S3 Storage Configuration!"
    }
  },

  "icon": "file://logo.png",
  "tags": [
    "photos",
+24 −5
Original line number Diff line number Diff line
@@ -12,8 +12,10 @@ RUN apt-get update && apt-get install -y git && \
RUN corepack enable

# Set environment variables for web app build
# Will be overridden at runtime with the actual server endpoint
ENV NEXT_PUBLIC_ENTE_ENDPOINT="https://localhost:8080"
# Use "/api" as the endpoint which will be replaced at runtime with the full URL
ENV NEXT_PUBLIC_ENTE_ENDPOINT="/api"
# Add a note for clarity
RUN echo "Building with NEXT_PUBLIC_ENTE_ENDPOINT=/api, will be replaced at runtime with full URL"

# Debugging the repository structure
RUN find . -type d -maxdepth 3 | sort
@@ -78,8 +80,14 @@ FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c663

# Install necessary packages (excluding golang as we'll install it manually)
RUN apt-get update && \
    apt-get install -y curl git nodejs npm libsodium23 libsodium-dev pkg-config nginx && \
    apt-get install -y curl git nodejs npm libsodium23 libsodium-dev pkg-config postgresql-client && \
    npm install -g yarn serve && \
    # Install Caddy instead of NGINX
    apt-get install -y debian-keyring debian-archive-keyring apt-transport-https && \
    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg && \
    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list && \
    apt-get update && \
    apt-get install -y caddy && \
    apt-get clean && apt-get autoremove && \
    rm -rf /var/cache/apt /var/lib/apt/lists

@@ -103,6 +111,17 @@ RUN git clone --depth=1 https://github.com/ente-io/ente.git . && \
    cp -r server/go.mod server/go.sum /app/data/go/ && \
    chmod 777 /app/data/go/go.mod /app/data/go/go.sum

# Pre-download Go dependencies
RUN cd server && \
    export GOMODCACHE="/app/data/go/pkg/mod" && \
    export GOFLAGS="-modfile=/app/data/go/go.mod -mod=mod" && \
    export GOTOOLCHAIN=local && \
    export GO111MODULE=on && \
    export GOSUMDB=off && \
    mkdir -p /app/data/go/pkg/mod && \
    chmod -R 777 /app/data/go && \
    go mod download

# Set Go environment variables
ENV GOTOOLCHAIN=local
ENV GO111MODULE=on
@@ -127,8 +146,8 @@ RUN chmod +x /app/pkg/start.sh
# Create NGINX directories
RUN mkdir -p /etc/nginx/sites-available /etc/nginx/sites-enabled

# Expose the web port (Cloudron expects port 8080)
EXPOSE 8080
# Expose the web port (Cloudron expects port 3080 now)
EXPOSE 3080

# Start the application
CMD ["/app/pkg/start.sh"] 
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
@@ -10,6 +10,28 @@ This repository contains the Cloudron packaging for [Ente](https://ente.io), an
- Configured to use Cloudron's mail service for sending emails
- Easy to deploy and manage through the Cloudron interface

## Requirements

### Browser Compatibility

Ente uses modern web technologies for its end-to-end encryption:

- **WebAssembly**: Required for cryptographic operations
- **IndexedDB**: Required for client-side data storage

Most modern browsers support these features, but they may be blocked by:
- Browser privacy settings
- Content Security Policies
- Certain browser extensions

This package includes custom Caddy configuration with appropriate security headers to ensure these features work correctly.

### S3-Compatible Storage

Ente requires an S3-compatible object storage service. You can use:
- Cloudron's built-in object storage
- External services like AWS S3, Wasabi, or MinIO

## Building and Installing

### Option 1: Build and Install Manually
@@ -53,6 +75,14 @@ The app is configured automatically using Cloudron's environment variables for:
- SMTP mail service
- App origin URL

### Additional Configuration

The package includes several enhancements to ensure proper functionality:

1. **Security Headers**: Custom Content-Security-Policy headers that allow WebAssembly and IndexedDB
2. **API Configuration**: Dynamic runtime configuration to ensure the frontend connects to the correct API endpoint
3. **CORS Headers**: Proper CORS configuration for API access

## Usage

### Web Client
@@ -77,6 +107,12 @@ cloudron update --app ente.yourdomain.com

## Troubleshooting

### Common Issues

1. **"Failed to fetch" errors**: Check if your browser is blocking API requests to your domain
2. **WebAssembly errors**: Ensure your browser supports and allows WebAssembly (try using Chrome or Firefox)
3. **IndexedDB errors**: Make sure your browser allows IndexedDB (not in private/incognito mode)

For issues specific to the Cloudron packaging, please open an issue in this repository.

For issues with Ente itself, please refer to the [main Ente repository](https://github.com/ente-io/ente).
+307 −94

File changed.

Preview size limit exceeded, changes collapsed.