Skip to content
Permalink
Browse files

Add configuration for docker-compose

  • Loading branch information...
marcomontalbano committed Sep 17, 2019
1 parent 729c9dd commit 181305a623512963d06966a1b113a9204eb6db2c
Showing with 38 additions and 0 deletions.
  1. +22 −0 docker-compose.yml
  2. +16 −0 nginx/default.conf
@@ -0,0 +1,22 @@
version: "3.7"
services:

nginx:
image: nginx:alpine
ports:
- "8080:80"
volumes:
- ./dist/client:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- lambda_functions

lambda_functions:
image: node:alpine
environment:
NODE_ENV: production
working_dir: /home/app
restart: always
volumes:
- ./:/home/app
command: ["npm", "run", "start:server"]
@@ -0,0 +1,16 @@
server {
listen 80;
root /var/www/html;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

location / {
try_files $uri $uri/ =404;
}

location /.netlify/functions {
proxy_pass http://lambda_functions:8081/.netlify/functions;
}
}

0 comments on commit 181305a

Please sign in to comment.
You can’t perform that action at this time.