new docker compose files for development mode, new docker for dev mode, update...

new docker compose files for development mode, new docker for dev mode, update config for both modes
parent ed917db2
......@@ -2,7 +2,6 @@
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
dist
src/config
node_modules
.history
*.zip
......@@ -13,6 +12,8 @@ node_modules
ncp-debug.log
npm-debug.log
npm-debug.log*
.env
.env.*
### OSX template
.DS_Store
......
......@@ -15,7 +15,7 @@ RUN npm install
COPY . /app
# start our server application by executing `npm start`, this command can be found into package.json scripts
CMD ["npm", "dev-webapp"]
# CMD ["npm", "run", "dev-webapp"]
# let's expose our app for port number 3300
#expose 3300
#our docker-compose version
version: "3.3"
# NOTE ======================================
# all config vars are passing as a env vars *
# ===========================================
# let's define our services being using for our app
services:
manager_front_app:
# build key is used to build our docker based on a Dockerfile placed into the path where docker-compose lives
build: .
container_name: manager_zboxapp_app
# let's create a volume to persist data between our machine and image docker
# copying all files into root path to /app folder
volumes:
- ./:/app
- /app/node_modules/
# map our port where app will be exposed, LOCAL_MACHINE_PORT:IMAGE_DOCKER_PORT
ports:
# pass the exposed port as a env var, eg: PORT=1000 should pass to docker 1000:1000
- "7500:7500"
command: npm run start-webapp
# passing throug env vars to container docker
environment:
# all config vars are passing as a env vars
PORT: 7500
NODE_ENV: development
......@@ -7,22 +7,21 @@ version: "3.3"
# let's define our services being using for our app
services:
# define our services name
node_front_app:
manager_front_app:
# build key is used to build our docker based on a Dockerfile placed into the path where docker-compose lives
build: .
container_name: zbox_manager_development
container_name: manager_zboxapp_app
# let's create a volume to persist data between our machine and image docker
# copying all files into root path to /app folder
volumes:
- ./:/app
- /app/node_modules/
- /app/dist/
# map our port where app will be exposed, LOCAL_MACHINE_PORT:IMAGE_DOCKER_PORT
ports:
# pass the exposed port as a env var, eg: PORT=1000 should pass to docker 1000:1000
- "${PORT}:${PORT}"
# passing throug env vars to container docker
command: npm run dev-webapp
environment:
# all config vars are passing as a env vars
PORT: ${PORT}
......
......@@ -76,15 +76,15 @@
},
"scripts": {
"check": "eslint --ext \".jsx\" --ignore-pattern node_modules --quiet .",
"build": "NODE_ENV=production webpack",
"deploy": "NODE_ENV=production webpack",
"build": "webpack",
"deploy": "webpack",
"run": "webpack --progress --watch",
"run-fullmap": "webpack --progress --watch",
"companies-service": "babel-node companies-service.js",
"server": "nodemon server.js",
"dev-server": "node server.js",
"sales-service": "babel-node sales-services.js",
"start-webapp": "NODE_ENV=development npm-run-all --parallel run server",
"dev-webapp": "NODE_ENV=production npm-run-all --parallel build dev-server"
"start-webapp": "npm-run-all --parallel run server",
"dev-webapp": "npm-run-all --parallel build dev-server"
}
}
......@@ -9,7 +9,7 @@ const config = require(configPath);
const express = require('express');
const server = express();
const bodyParser = require('body-parser');
const port = process.env.PORT || 8000;
const port = process.env.PORT;
const managerProxyURL = process.env.managerProxy || config.managerProxy; //eslint-disable-line no-process-env
const URlsToProxy = ['/zimbra_proxy', '/powerdns_proxy', '/folio'];
......
......@@ -2,7 +2,7 @@
"debug": true,
"dev": false,
"enableStores": false,
"zimbraUrl": "https://manager.zboxapp.com/zimbra_proxy/service/admin/soap",
"zimbraUrl": "https://manager2.zboxapp.com/zimbra_proxy/service/admin/soap",
"zimbraProxy": "https://zimbra.zboxapp.dev:7071",
"dnsApiUrl": "http://zimbra.zboxapp.dev:3000",
"webMailUrl": "https://admin-mail.zboxapp.com/",
......@@ -16,7 +16,7 @@
"invoiceAPI": { "currency": "CLP", "requireTax": true },
"timeoutRequest": 600000,
"dns": {
"url": "https://manager.zboxapp.com/powerdns_proxy/",
"url": "https://manager2.zboxapp.com/powerdns_proxy/",
"token": "otto",
"inmutable": ["mx", "soa", "ns", "spf"],
"template": {
......@@ -130,10 +130,10 @@
"multiFormDomain": { "hasMailCleaner": false, "hasDNSZone": true },
"webmailLifetime": 3600,
"companiesEndPoints": {
"list": "https://manager.zboxapp.com/folio/companies.json",
"detail": "https://manager.zboxapp.com/folio/companies/{id}.json",
"list": "https://manager2.zboxapp.com/folio/companies.json",
"detail": "https://manager2.zboxapp.com/folio/companies/{id}.json",
"invoices":
"https://manager.zboxapp.com/folio/companies/{id}/invoices.json?exclude=draft"
"https://manager2.zboxapp.com/folio/companies/{id}/invoices.json?exclude=draft"
},
"globalAttrsBySection": {
"mailboxes": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment