Giter VIP home page Giter VIP logo

platform's Introduction

A personal platform for my experiments

Contributing

Concept

  • Application is a separated folder in platform_apps/ or deploy_apps/
  • All applications files uploads to /var/apps
  • Every application with docker-compose.yml would be started with docker-compose up -d. Look at cloud-init.yaml for more info.

Getting started

  • cp .env.dist .env
  • make run

Notes

  • To get service logs journalctl -u service-name.service
  • To start/stop service systemctl start/stop service-name.service

Usage

  • add directory with docker-compose.yml to /platform_apps
    • use ingress external network to enable ingress routing to your container.
    • to set up ingress:
  • add env variables to terraform

Examples

Docker-compose

services:
  nginx:
    image: "nginx:latest"
    labels:
      - "traefik.http.routers.index.rule=Host(`${INDEX_HOSTNAME}`)"
      - "traefik.http.routers.index.rule=PathPrefix(`/test`)"
      - "traefik.http.routers.index.middlewares=myrouter-stripprefix"
      - "traefik.http.middlewares.index-stripprefix.stripprefix.prefixes=/test,/test/"
      - "traefik.http.routers.index.tls=true"
      - "traefik.http.routers.index.tls.certresolver=letsencrypt"
    networks:
      - ingress
    environment:
      - INDEX_HOSTNAME
    volumes:
      - ./conf.d:/etc/nginx/conf.d

networks:
  ingress:
    external: true

Docker run

  docker run \
    -l 'traefik.http.routers.myrouter.rule=PathPrefix(`/test`)' \
    -l 'traefik.http.routers.myrouter.middlewares=myrouter-stripprefix' \
    -l 'traefik.http.middlewares.myrouter-stripprefix.stripprefix.prefixes=/test,/test/' \
    --network=ingress \
    nginx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.