Adding current deploy configuration
This commit is contained in:
1 parent
39c3726981
commit
3c4d5eda5b
5 files changed
+107
No files matched your search
@@ -0,0 +1,5 @@
|
||||
FROM duluca/minimal-nginx-web-server
|
||||
COPY ./default /etc/nginx/sites-enabled/default
|
||||
COPY . /var/www
|
||||
CMD 'nginx'
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
server {
|
||||
listen 3100;
|
||||
|
||||
root /var/www;
|
||||
index index.html index.htm;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
server_name localhost;
|
||||
|
||||
# Add 1 week expires header for static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||
expires 1w;
|
||||
}
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to redirecting to index.html
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# If nginx can't find a file, fallback to the homepage.
|
||||
location @root {
|
||||
rewrite .* / redirect;
|
||||
}
|
||||
|
||||
include /etc/nginx/basic.conf;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
version: '3'
|
||||
services:
|
||||
node:
|
||||
image: masterapp-client-dev:v1
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile.prod
|
||||
args:
|
||||
APP_PATH: /var/www
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- APP_PATH=/var/www
|
||||
- PROD_GRAPHQL=https://platform-api-dev.advancedalgos.net/graphql
|
||||
- VIRTUAL_HOST=platform-dev.advancedalgos.net
|
||||
- LETSENCRYPT_HOST=platform-dev.advancedalgos.net
|
||||
- LETSENCRYPT_EMAIL=ssl-certificates@advancedalgos.org
|
||||
- VIRTUAL_PORT=3100
|
||||
container_name: masterapp-client-dev
|
||||
tty: true
|
||||
stdin_open: true
|
||||
working_dir: ${APP_PATH}
|
||||
command: ['nginx']
|
||||
restart: always
|
||||
expose:
|
||||
- 3100
|
||||
network_mode: webproxy
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: webproxy
|
||||
@@ -0,0 +1,21 @@
|
||||
FROM mhart/alpine-node:8
|
||||
|
||||
ENV PORT=4100
|
||||
|
||||
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
|
||||
@@ -0,0 +1,24 @@
|
||||
version: '3'
|
||||
services:
|
||||
node:
|
||||
image: masterappapi-dev:v1
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile.prod
|
||||
env_file: ./.env
|
||||
container_name: masterappapi
|
||||
tty: true
|
||||
stdin_open: true
|
||||
volumes:
|
||||
- ./:/var/www/app
|
||||
- /var/www/app/node_modules
|
||||
working_dir: /var/www/app
|
||||
restart: always
|
||||
command: npm start
|
||||
expose:
|
||||
- 4100
|
||||
network_mode: webproxy
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: webproxy
|
||||
Reference in new issue
Block a user