version: "3.1"

services:

  jekyll:
    restart: always
    image: jekyll/jekyll:latest
    container_name: p2p.faircoin.co-jekyll
    command: jekyll build --watch
    environment:
      JEKYLL_UID: ${RUNNER_UID:-1000}
      JEKYLL_GID: ${RUNNER_GID:-1000}
    volumes:
      - ./services/jekyll:/srv/jekyll

  php-server:
    restart: always
    container_name: p2p.faircoin.co-jekyll-php
    image: php:7
    command: php -S 0.0.0.0:4000 -t /var/www/_site
    ports:
      - ${LH_PORT_p2p:-4001}:4000
    user: "${RUNNER_UID:-1000}:${RUNNER_GID:-1000}"
    depends_on:
      - jekyll
    volumes:
      - ./services/jekyll:/var/www

#  faircoin:
#    restart: always
#    build:
#      context: services/faircoin
#      args:
#        source_repository: "https://github.com/faircoin/faircoin.git"
#        RUNNER_UID: "${RUNNER_UID:-1000}"
#        RUNNER_GID: "${RUNNER_GID:-1000}"
#    environment:
#      AUTOSTART: ${AUTOSTART:-1}
#    env_file:
#      - ${FAIRCHAINS_CONF}
#    container_name: p2p-faircoind
#    user: "${RUNNER_UID:-1000}:${RUNNER_GID:-1000}"
#    stop_grace_period: 30s
#    volumes:
#      - fairchains:/home/faircoin/.faircoin2
#      - ./services/faircoin/scripts:/home/faircoin/scripts

volumes:
  fairchains: