Skip to main content

Snibox | Self-hosted snippet manager

Snibox | Self-hosted snippet manager

version: '3'
services:
  frontend:
    image: snibox/nginx-puma:1.15.9
    ports:
      - "9000:80"
    volumes:
      - static-files:/var/www/html
    depends_on:
      - backend
  backend:
    image: snibox/snibox:latest
    command: sh -c "rm -rf tmp/pids && ./bin/rails s -p 3000 -b '0.0.0.0'"
    environment:
      DB_NAME: [yourdbname]
      DB_USER: [yourdbusername]
      DB_PASS: [yourdbpassword]
      DB_HOST: "localhost"
      DB_PORT: "3000"
      FORCE_SSL: "false"
      #MAILGUN_SMTP_PORT: "${MAILGUN_SMTP_PORT}"
      #MAILGUN_SMTP_SERVER: "${MAILGUN_SMTP_SERVER}"
      #MAILGUN_SMTP_LOGIN: "${MAILGUN_SMTP_LOGIN}"
      #MAILGUN_SMTP_PASSWORD: "${MAILGUN_SMTP_PASSWORD}"
      #MAILGUN_API_KEY: "${MAILGUN_API_KEY}"
      #MAILGUN_DOMAIN: "${MAILGUN_DOMAIN}"
      #MAILGUN_PUBLIC_KEY: "${MAILGUN_PUBLIC_KEY}"
      SECRET_KEY_BASE: [yoursecretkey]
    volumes:
      - static-files:/app/public
    depends_on:
      - database
  database:
    image: postgres:10.7-alpine
    volumes:
      - pg-data:/var/lib/postgresql/data
volumes:
  pg-data:
  static-files: