Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

​Cannot configure MailerModule even with environment variables confirmed #8872

Open
1 task done
dto opened this issue Nov 20, 2024 · 3 comments
Open
1 task done

Comments

@dto
Copy link

dto commented Nov 20, 2024

What happened?

Even using "docker compose --file docker-compose.yml --env-file .env config" to verify that my MAILER_HOST etc are all set correctly, Affine still won't configure the Mailer system. How can I debug this further?

Distribution version

Linux

What browsers are you seeing the problem on if you're using web version?

Chrome, Firefox

Are you self-hosting?

  • Yes

Relevant log output

Attaching to affine_postgres, affine_redis, affine_selfhosted
affine_redis       | 1:C 20 Nov 2024 03:26:14.445 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
affine_redis       | 1:C 20 Nov 2024 03:26:14.446 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
affine_redis       | 1:C 20 Nov 2024 03:26:14.446 * Redis version=7.4.1, bits=64, commit=00000000, modified=0, pid=1, just started
affine_redis       | 1:C 20 Nov 2024 03:26:14.446 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
affine_redis       | 1:M 20 Nov 2024 03:26:14.447 * monotonic clock: POSIX clock_gettime
affine_redis       | 1:M 20 Nov 2024 03:26:14.447 * Running mode=standalone, port=6379.
affine_redis       | 1:M 20 Nov 2024 03:26:14.448 * Server initialized
affine_redis       | 1:M 20 Nov 2024 03:26:14.448 * Loading RDB produced by version 7.4.1
affine_redis       | 1:M 20 Nov 2024 03:26:14.449 * RDB age 1 seconds
affine_redis       | 1:M 20 Nov 2024 03:26:14.449 * RDB memory usage when created 0.93 Mb
affine_redis       | 1:M 20 Nov 2024 03:26:14.449 * Done loading RDB, keys loaded: 1, keys expired: 0.
affine_redis       | 1:M 20 Nov 2024 03:26:14.449 * DB loaded from disk: 0.001 seconds
affine_redis       | 1:M 20 Nov 2024 03:26:14.449 * Ready to accept connections tcp
affine_postgres    | 
affine_postgres    | PostgreSQL Database directory appears to contain a database; Skipping initialization
affine_postgres    | 
affine_postgres    | 2024-11-20 03:26:14.513 UTC [1] LOG:  starting PostgreSQL 16.5 (Debian 16.5-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
affine_postgres    | 2024-11-20 03:26:14.514 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
affine_postgres    | 2024-11-20 03:26:14.514 UTC [1] LOG:  listening on IPv6 address "::", port 5432
affine_postgres    | 2024-11-20 03:26:14.517 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
affine_postgres    | 2024-11-20 03:26:14.519 UTC [28] LOG:  database system was shut down at 2024-11-20 03:26:13 UTC
affine_postgres    | 2024-11-20 03:26:14.524 UTC [1] LOG:  database system is ready to accept connections
affine_selfhosted  | running predeploy script.
affine_selfhosted  | yarn run v1.22.22
affine_selfhosted  | $ yarn prisma migrate deploy && node --import ./scripts/register.js ./dist/data/index.js run
affine_selfhosted  | $ /app/node_modules/.bin/prisma migrate deploy
affine_selfhosted  | Prisma schema loaded from schema.prisma
affine_selfhosted  | Datasource "db": PostgreSQL database "affine", schema "public" at "postgres:5432"
affine_postgres    | 2024-11-20 03:26:28.397 UTC [39] LOG:  could not receive data from client: Connection reset by peer
affine_selfhosted  | 
affine_selfhosted  | 48 migrations found in prisma/migrations
affine_selfhosted  | 
affine_selfhosted  | 
affine_selfhosted  | No pending migrations to apply.
affine_selfhosted  | (node:89) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
affine_selfhosted  | (Use `node --trace-warnings ...` to show where the warning was created)
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM    WARN [MailerModule] MailerModule is not enabled because of the required configuration is not satisfied.
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM    WARN [MailerModule] Unsatisfied configuration:
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM    WARN [MailerModule]   AFFiNE.mailer.host
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [NestFactory] Starting Nest application... +5ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] CommandRootModule dependencies initialized +39ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] GqlModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] CacheModule dependencies initialized +7ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] EventModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] PrismaModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] MetricsModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] StorageProviderModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] HelpersModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] ErrorModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] WebSocketModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] EventEmitterModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] CommandRunnerModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] MutexModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] PermissionModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] MailModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] StorageModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] CliAppModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] ServerConfigModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] RateLimiterModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] FeatureModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] QuotaModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] SelfhostModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] UserModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] DocStorageModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] SyncModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] DocRendererModule dependencies initialized +2ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] WorkspaceModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 89  - 11/20/2024, 3:26:32 AM     LOG [RunCommand] Done 0 migrations
affine_selfhosted  | Done in 6.83s.
affine_selfhosted  | (node:109) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
affine_selfhosted  | (Use `node --trace-warnings ...` to show where the warning was created)
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM    WARN [MailerModule] MailerModule is not enabled because of the required configuration is not satisfied.
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM    WARN [MailerModule] Unsatisfied configuration:
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM    WARN [MailerModule]   AFFiNE.mailer.host
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [NestFactory] Starting Nest application... +38ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] GqlModule dependencies initialized +38ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] CacheModule dependencies initialized +4ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] EventModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] PrismaModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] MetricsModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] StorageProviderModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] HelpersModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] ErrorModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] WebSocketModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] MutexModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] EventEmitterModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] PermissionModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] MailModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] StorageModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] AppModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] ServerConfigModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] RateLimiterModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] FeatureModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] QuotaModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] UserModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] SelfhostModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] GraphQLModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] DocStorageModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] SyncModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] DocRendererModule dependencies initialized +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] WorkspaceModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:join" message +15ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:leave" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:load-doc" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:push-doc-updates" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:load-doc-timestamps" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:join-awareness" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:leave-awareness" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:load-awarenesses" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "space:update-awareness" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-handshake-sync" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-leave-sync" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-pre-sync" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-update-v2" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "doc-load-v2" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-handshake-awareness" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "client-leave-awareness" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "awareness-init" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [WebSocketsController] SpaceSyncGateway subscribed to the "awareness-update" message +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] AppController {/info}: +2ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/info, GET} route +2ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] UserAvatarController {/api/avatars}: +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/avatars/:id, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] AuthController {/api/auth}: +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/preflight, POST} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/sign-in, POST} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/sign-out, GET} route +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/magic-link, POST} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/session, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/auth/sessions, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] WorkspacesController {/api/workspaces}: +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/workspaces/:id/blobs/:name, GET} route +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/workspaces/:id/docs/:guid, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/workspaces/:id/docs/:guid/histories/:timestamp, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] DocRendererController {/workspace}: +1ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/workspace/*, GET} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RoutesResolver] CustomSetupController {/api/setup}: +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [RouterExplorer] Mapped {/api/setup/create-admin-user, POST} route +0ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [DocStorageCronJob] Updates pending queue auto merging cron started
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [GraphQLModule] Mapped {/graphql, POST} route +172ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [NestApplication] Nest application successfully started +51ms
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [App] AFFiNE Server is running in [selfhosted] mode
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [App] Listening on http://0.0.0.0:3010
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:26:36 AM     LOG [App] And the public server should be recognized as https://127.0.0.1:3010
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:27:07 AM VERBOSE [CacheInterceptor] cache blobs:3804357b-52c6-4a37-9947-30e7eaf5a189 miss
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:28:08 AM VERBOSE [CacheInterceptor] cache blobs:3804357b-52c6-4a37-9947-30e7eaf5a189 hit
affine_selfhosted  | [Nest] 109  - 11/20/2024, 3:29:09 AM VERBOSE [CacheInterceptor] cache blobs:3804357b-52c6-4a37-9947-30e7eaf5a189 hit

Anything else?

here is my version info
Screenshot at 2024-11-19 12-38-57

@forehalo
Copy link
Member

forehalo commented Nov 20, 2024

try adding the following updates in your compose file, and make sure your env file is in the correct format

affine:
  # ...
+ env_file:
+   - path/to/your/envfile
  # ...

@dto
Copy link
Author

dto commented Nov 20, 2024

Hi. Thanks so much for your response. This suggestion does not appear to help.

  1. Here is the top of my compose.yaml file:
services:
  affine:
    env_file:
      - /root/AFFiNE/.env
    image: ghcr.io/toeverything/affine-graphql:beta
    container_name: affine_selfhosted
  1. excerpted output of "docker compose --file .github/deployment/self-host/compose.yaml --env-file .env config"
name: self-host
services:
  affine:
    command:
      - sh
      - -c
      - node ./scripts/self-host-predeploy && node ./dist/index.js
    container_name: affine_selfhosted
    depends_on:
      postgres:
        condition: service_healthy
        required: true
      redis:
        condition: service_healthy
        required: true
    environment:
      AFFINE_CONFIG_PATH: /root/.affine/config
      AFFINE_SERVER_HOST: 127.0.0.1
      AFFINE_SERVER_HTTPS: "true"
      AFFINE_SERVER_PORT: "3010"
      DATABASE_URL: postgres://affine:affine@postgres:5432/affine
      MAILER_HOST: REDACTED
      MAILER_PASSWORD: REDACTED
      MAILER_SECURE: "true"
      MAILER_SENDER: REDACTED
      MAILER_USER: REDACTED
...

I notice quotes around the "true" under MAILER_SECURE, but other instances of "true" in the output do not have them.

@dto
Copy link
Author

dto commented Nov 20, 2024

The format of my .env file is simple KEY=VALUE, one per line. In that file I have MAILER_SECURE=true (without quotes around "true")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants