Merge pull request #34 from AAVikings/develop

Node configuration
This commit is contained in:
benme authored and GitHub committed 2019-05-14 10:26:51 -03:00
commit e8b5db050b
9 files changed
+102 -11

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
# Ignore files to be uploaded to the image
.env
.env.dev
.env.prod
.git
.gitignore
Dockerfile
Dockerfile.prod
README.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
/coverage
/.nyc_output
# VS Studio files
.vs/*
obj/*
bin/*
/.vscode
Project.njsproj
this.server.config.dev.json
+4
View File
@@ -0,0 +1,4 @@
NODE_ENV=production
PORT=4101
+8 -7
View File
@@ -2,14 +2,15 @@
.vs/*
obj/*
bin/*
/.vscode
node_modules/*
this.server.config.json
.env
dependency/
.env.dev
this.server.config.json
this.server.config.dev.json
\.nyc_output/
/node_modules
/dependency
coverage/*
\.vscode/
/.nyc_output
/coverage
+19
View File
@@ -0,0 +1,19 @@
FROM mhart/alpine-node:12
# Directory where the service will be installed
ARG API_DIR=/usr/src/saweb
# Prepare required directories
RUN mkdir -p ${API_DIR}
# Use app directory as current workdir
WORKDIR ${API_DIR}
# Copy package.json to workdir
COPY . ${API_DIR}/
# Install dependencies
RUN npm install --production
# Expose Port
EXPOSE $PORT
+21
View File
@@ -0,0 +1,21 @@
FROM mhart/alpine-node:8
ENV PORT=4101
RUN mkdir -p /var/www/app && \
mkdir -p /var/www/app/node_modules
# Use app directory as current workdir
WORKDIR /var/www/app
ENV PATH /var/www/app/node_modules/.bin:$PATH
# Copy package.json to workdir
COPY package.json /var/www/app/package.json
# Install dependencies
RUN npm install
# Copy application code
COPY . /var/www/app
# Expose Port
EXPOSE $PORT
+1 -2
View File
@@ -42,7 +42,6 @@
<Compile Include="Plotter.js" />
<Compile Include="PlotterPanel.js" />
<Compile Include="Server\BotsScripts.js" />
<Compile Include="Server\Exchange\ExchangeAPI.js" />
<Compile Include="Server\Exchange\exchangeUtils.js" />
<Compile Include="Server\Exchange\Wrappers\beautifier.js" />
<Compile Include="Server\Exchange\Wrappers\binance.js" />
@@ -129,4 +128,4 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
</Project>
+24
View File
@@ -0,0 +1,24 @@
version: '3'
services:
node:
image: aaweb-dev:v1
build:
context: .
dockerfile: ./Dockerfile.prod
env_file: ./.env
container_name: aaweb
tty: true
stdin_open: true
volumes:
- ./:/var/www/app
- /var/www/app/node_modules
working_dir: /var/www/app
restart: always
command: node server
expose:
- 4101
network_mode: webproxy
networks:
default:
external:
name: webproxy
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "saweb",
"name": "@superalgos/saweb",
"version": "0.1.0",
"lockfileVersion": 1,
"requires": true,
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "saweb",
"name": "@superalgos/saweb",
"version": "0.1.0",
"description": "Superalgos web interface.",
"main": "server.js",