---
version: '3'
services:
  app:
    image: ghost:0.11.12-alpine
    ports:
      - "2368:2368"
    environment:
      NODE_ENV: production
    volumes:
      - "./config.js:/var/lib/ghost/config.js"
      - "/var/lib/data/docker/ghost0/data:/var/lib/ghost/content"

  nginx:
    image: nginx
    ports:
      - "2369:2369"
    volumes:
      - ./nginx.conf.envsubst:/etc/nginx/nginx.conf.envsubst:ro
      - ./nginx_cmd.sh:/nginx_cmd.sh:ro
    env_file:
      - ../ghost0.env
    command: sh /nginx_cmd.sh
    depends_on:
      - app

---
version: '3'
services:
  app:
    image: ghost:0.11.12-alpine
    ports:
      - "127.0.0.1:2368:2368"
    environment:
      NODE_ENV: production
    volumes:
      - "./config.js:/var/lib/ghost/config.js"
      - "/var/lib/data/docker/ghost0/data:/var/lib/ghost/content"

  nginx:
    image: nginx
    ports:
      - "127.0.0.1:2369:2369"
    volumes:
      - ./nginx.conf.envsubst:/etc/nginx/nginx.conf.envsubst:ro
      - ./nginx_cmd.sh:/nginx_cmd.sh:ro
    env_file:
      - ../ghost0.env
    command: sh /nginx_cmd.sh
    depends_on:
      - app

Make docker reject access from outside of localhost
Make docker reject access from outside of localhost
