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