@@ -173,7 +173,7 @@ export async function startNextcloud(branch = 'master', mountApp: boolean|string
173
173
const container = await docker . createContainer ( {
174
174
Image : SERVER_IMAGE ,
175
175
name : getContainerName ( ) ,
176
- Env : [ `BRANCH=${ branch } ` ] ,
176
+ Env : [ `BRANCH=${ branch } ` , 'APCU=1' ] ,
177
177
HostConfig : {
178
178
Binds : mounts . length > 0 ? mounts : undefined ,
179
179
PortBindings,
@@ -228,6 +228,19 @@ export const configureNextcloud = async function(apps = ['viewer'], vendoredBran
228
228
await runExec ( container , [ 'php' , 'occ' , 'config:system:set' , 'force_locale' , '--value' , 'en_US' ] , true )
229
229
await runExec ( container , [ 'php' , 'occ' , 'config:system:set' , 'enforce_theme' , '--value' , 'light' ] , true )
230
230
231
+ // Checking apcu
232
+ console . log ( '├─ Checking APCu configuration... 👀' )
233
+ const distributed = await runExec ( container , [ 'php' , 'occ' , 'config:system:get' , 'memcache.distributed' ] )
234
+ const local = await runExec ( container , [ 'php' , 'occ' , 'config:system:get' , 'memcache.local' ] )
235
+ const hashing = await runExec ( container , [ 'php' , 'occ' , 'config:system:get' , 'hashing_default_password' ] )
236
+ if ( ! distributed . includes ( 'Memcache\\APCu' )
237
+ || ! local . includes ( 'Memcache\\APCu' )
238
+ || ! hashing . includes ( 'true' ) ) {
239
+ console . log ( '└─ APCu is not properly configured 🛑' )
240
+ throw new Error ( 'APCu is not properly configured' )
241
+ }
242
+ console . log ( '│ └─ OK !' )
243
+
231
244
// Build app list
232
245
const json = await runExec ( container , [ 'php' , 'occ' , 'app:list' , '--output' , 'json' ] , false )
233
246
// fix dockerode bug returning invalid leading characters
0 commit comments