fix: containers @ bootstrap
This commit is contained in:
parent
dcf48dab95
commit
378ddaf762
|
@ -1,4 +1,4 @@
|
|||
export default (flecks) => {
|
||||
module.exports = (flecks) => {
|
||||
const {
|
||||
dialect,
|
||||
username,
|
5
packages/db/build/flecks.bootstrap.js
Normal file
5
packages/db/build/flecks.bootstrap.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
const containers = require('./containers');
|
||||
|
||||
exports.hooks = {
|
||||
'@flecks/docker.containers': containers,
|
||||
};
|
|
@ -1,7 +1,6 @@
|
|||
import {Flecks} from '@flecks/core';
|
||||
|
||||
import {createDatabaseConnection} from './connection';
|
||||
import containers from './containers';
|
||||
import register from './register';
|
||||
|
||||
export {
|
||||
|
@ -21,7 +20,6 @@ export const hooks = {
|
|||
register(gathered, flecks.db.sequelize);
|
||||
}
|
||||
},
|
||||
'@flecks/docker.containers': containers,
|
||||
'@flecks/server.up': Flecks.priority(
|
||||
async (flecks) => {
|
||||
flecks.db.sequelize = await createDatabaseConnection(flecks);
|
||||
|
|
|
@ -75,7 +75,7 @@ export default async (flecks, key, config) => {
|
|||
);
|
||||
const child = spawn('docker', args, {
|
||||
detached: true,
|
||||
stdio: 'ignore',
|
||||
// stdio: 'ignore',
|
||||
});
|
||||
await new Promise((r, e) => {
|
||||
child.on('error', e);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default (flecks) => ({
|
||||
module.exports = (flecks) => ({
|
||||
redis: {
|
||||
environment: {
|
||||
app: {
|
|
@ -1,4 +1,6 @@
|
|||
export const hooks = {
|
||||
const containers = require('./containers');
|
||||
|
||||
exports.hooks = {
|
||||
'@flecks/core.config': () => ({
|
||||
/**
|
||||
* Redis server host.
|
||||
|
@ -9,4 +11,5 @@ export const hooks = {
|
|||
*/
|
||||
port: 6379,
|
||||
}),
|
||||
'@flecks/docker.containers': containers,
|
||||
};
|
|
@ -19,7 +19,6 @@
|
|||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"session/server.js",
|
||||
"server.js"
|
||||
],
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {Flecks} from '@flecks/core';
|
||||
|
||||
import containers from './containers';
|
||||
import createClient from './create-client';
|
||||
|
||||
export {default as redis} from 'redis';
|
||||
|
@ -30,7 +29,6 @@ const safeKeys = async (client, pattern, caret) => {
|
|||
export const keys = (client, pattern) => safeKeys(client, pattern, 0);
|
||||
|
||||
export const hooks = {
|
||||
'@flecks/docker.containers': containers,
|
||||
'@flecks/repl.context': async (flecks) => ({
|
||||
redisClient: await createClient(flecks),
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user