Skip to content

Instantly share code, notes, and snippets.

@nachocodexx
Created February 8, 2022 07:07
Show Gist options
  • Save nachocodexx/96cc9aed5fa2802e5079c6d634b57504 to your computer and use it in GitHub Desktop.
Save nachocodexx/96cc9aed5fa2802e5079c6d634b57504 to your computer and use it in GitHub Desktop.
version: '3.7'
services:
service-replicator-0:
image: "nachocode/system-rep:v2"
restart: always
hostname: "sr-0"
environment:
NODE_ID: "sr-0"
NODE_HOST: "0.0.0.0"
NODE_PORT: 5000
# For more info: https://github.com/docker-java/docker-java
DOCKER_SOCK: "unix:///app/src/docker.sock"
# Host log path
HOST_LOG_PATH: "/test/logs"
# Docker log path
LOG_PATH: "/app/logs"
API_VERSION: 2
# ID: PREFIX-(^{a-zA-Z0-9}){12}
AUTO_NODE_ID: "false"
DOCKER_NETWORK_NAME: "my-net"
# SWARM mode is in working-progress
DOCKER_MODE: "LOCAL"
# disabled this featured is only for the replication system.
DAEMON_ENABLED: "false"
# This return the PUBLIC_PORT.
# Port mapping -> PUBLCIC_PORT:DOCKER_PORT
USE_PUBLIC_PORT: "true"
ports:
# PUBLIC_PORT:DOCKER_PORT
- "5000:5000"
networks:
- my-net
volumes:
- /var/run/docker.sock:/app/src/docker.sock
# HOST_LOG_PATH:LOG_PATH
- /test/logs:/app/logs
networks:
my-net:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment