Meteor 1.4.2 with apollo and docker

Hi guys,

Lately i posted many issues regarding deploying a meteor app on our own servers as am a newbie in the deploying field but i never even got a answer…i do hope ill get some help on that post though…

So ive written my server app with yours truly(Meteor) and now i wish to deploy it to our own server which runs windows server 2008…I recently came across docker and now i installed the docker toolbox on the machine.I also have an http-proxy package running in my meteor app which launch the apollo server and gives it the port 4000. so meteor serves at port 3000 and apolloserver at 4000…

how can i create a docker image which exposes those two ports?

For now i havent been able to get it working with docker…

Here’s my server.js file

import express from 'express';
import bodyParser from 'body-parser';
import {Meteor} from 'meteor/meteor';
import {apolloExpress,graphiqlExpress} from 'apollo-server';
import {makeExecutableSchema,addMockFunctionsToSchema} from 'graphql-tools';
import proxyMiddleware from 'http-proxy-middleware';
import schema from './schema.js';
import resolvers from './resolvers.js';


const GRAPHQL_PORT=4000;

let graphQLServer=express();

const executableSchema=makeExecutableSchema({
  typeDefs:schema,
  resolvers:resolvers,
  allowUndefinedInResolve:false,
  printErrors:true
});

graphQLServer.use('/graphql',bodyParser.json(),apolloExpress({
    schema:executableSchema,
    context:{}
}));
graphQLServer.use('/graphiql',graphiqlExpress({
  endpointURL:'/graphql'
}));
graphQLServer.use('/', (req, res) => res.redirect('/graphiql'));
graphQLServer.listen(GRAPHQL_PORT);
WebApp.rawConnectHandlers.use(proxyMiddleware(`http://localhost:${GRAPHQL_PORT}/graphql`));

How can i have create a development environment and a production one using Docker?
So here you have it guys please if you know something ,point me to the right direction…i hope this wont fall in void…

Thank you all.

1 Like