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