Originally created by: waterfoul
It would be fairly trivial to change the docker file to deploy using a production meteor setup, You would only require people to setup their own mongodb for the storage of settings (which most people will have anyway). For now I've just mounted these two files into the container and I have it running in prod mode with ssl
run.sh
#!/bin/sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
dnf install -y make gcc-c++
export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install stable
set -xe
dir=$(pwd)
cd $dir
/usr/local/bin/meteor build /build --architecture os.linux.x86_64 --unsafe-perm
cd /build
tar -xf mongoclient.tar.gz
cd bundle
(cd programs/server && npm install --production && npm install tunnel-ssh)
cd /config
npm install http-proxy
node /config/proxy.js &
cd /build/bundle
export PORT=80
node main.js
proxy.js
var httpProxy = require('http-proxy');
httpProxy.createProxyServer({
target: 'http://localhost',
ssl: {
key: fs.readFileSync('/certs/privkey.pem', 'utf8'),
cert: fs.readFileSync('/certs/fullchain.pem', 'utf8')
}
}).listen(443);
I'm only recommending that you move the container to prod mode, although enabling ssl too would be a bonus. To update the container you would need to:
RUN /usr/local/bin/meteor --unsafe-perm build /build --architecture os.linux.x86_64WORKDIR /buildRUN tar -xf mongoclient.tar.gzRUN cd /build/bundle/production/server && npm installWORKDIR /build/bundleThis may not result in the cleanest setup so it might be better to just convert the container to use a node base. If you switch to the node base you should also be able to just add a pre-built bundle tar, run production/server && npm install and set the cmd
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rsercano
Hello,
I'm not an export on docker, I would like to keep another branch for this version, and for your version could you please kindly raise a pull request for master?