fix: container propagation

This commit is contained in:
cha0s 2024-02-07 15:30:32 -06:00
parent e4ca855458
commit 9fa214fb82
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import {Flecks} from '@flecks/core'; import {Flecks} from '@flecks/core';
import containers from '../build/containers';
import {createDatabaseConnection} from './connection'; import {createDatabaseConnection} from './connection';
import register from './register'; import register from './register';
@ -20,6 +21,7 @@ export const hooks = {
register(gathered, flecks.db.sequelize); register(gathered, flecks.db.sequelize);
} }
}, },
'@flecks/docker.containers': containers,
'@flecks/server.up': Flecks.priority( '@flecks/server.up': Flecks.priority(
async (flecks) => { async (flecks) => {
flecks.db.sequelize = await createDatabaseConnection(flecks); flecks.db.sequelize = await createDatabaseConnection(flecks);

View File

@ -1,5 +1,6 @@
import {Flecks} from '@flecks/core'; import {Flecks} from '@flecks/core';
import containers from '../build/containers';
import createClient from './create-client'; import createClient from './create-client';
export {default as redis} from 'redis'; export {default as redis} from 'redis';
@ -29,6 +30,7 @@ const safeKeys = async (client, pattern, caret) => {
export const keys = (client, pattern) => safeKeys(client, pattern, 0); export const keys = (client, pattern) => safeKeys(client, pattern, 0);
export const hooks = { export const hooks = {
'@flecks/docker.containers': containers,
'@flecks/repl.context': async (flecks) => ({ '@flecks/repl.context': async (flecks) => ({
redisClient: await createClient(flecks), redisClient: await createClient(flecks),
}), }),