Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Docker Compose

Richard Szolár edited this page Aug 4, 2019 · 1 revision

You are free to put a docker-compose.yaml file in the root folder of this repository and run it with docker.

So for example if you would like to have a webserver like nginx in front of the NodeJS app, because of easier SSL setup or Basic Auth or load balancing, etc...

Here is a sample config:

version: "2"
services:
  node:
    image: "node"
    user: "node"
    restart: always
    working_dir: /home/snc-node-bridge
    environment:
      - NODE_ENV=production
    volumes:
      - ./snc-node-bridge:/home/snc-node-bridge
    command: "yarn start"
  rest-web:
    image: nginx
    restart: always
    volumes:
      - ./nginx/conf.d/:/etc/nginx/conf.d/
    links:
      - node
    ports:
      - "8080:8080"

Feel free to adjust the ports if necessary, the NodeJS app runs on port 8080, but with this you can easily change the port. The Nginx listens on an HTTP port 8080.

Clone this wiki locally