Git Product home page Git Product logo

data's Introduction

#self hosted data/git

nextcloud and gitlab with postgress, redis and traefik via docker. oh yes please. also object storage via minio.

pre-requisite

$ git clone https://github.com/undefinedtea/data.git
$ cd data

this environment implements a seperation between traefik and other container service, allowing a microservice implementation. consider to change the folder structure (namely com.undefinedtea.data.service) to reflect your environment and ammend any following command accordingly. the principle for me is that each service has it's own folder, which means that this environment can be accomodating to different scenarios.

to rename the folder com.undefinedtea.data.service to com.domain.file.service for instance (meaning that all occurances of data.undefinedtea.com should be replaces with file.domain.com later on to reflect the folder structure)

$ mv com.undefinedtea.data.service com.domain.file.service

in network.service/docker-compose.yml make sure the following command values reflect your enviornment.

commands:
  # [...]
  - "--pilot.token=${PILOT}"
  # [...]
  - "[email protected]"
  # [...]

in network.service/docker-compose.yml make sure the following label values reflect your enviornment.

labels:
  # [...]
  - traefik.http.routers.traefik.rule=Host(`api-pilot.undefinedtea.com`)
  # [...]

in com.undefinedtea.data.service/docker-compose.yml make sure the following label values reflect your enviornment.

labels:
  # [...]
  - traefik.http.routers.service.rule=Host(`data.undefinedtea.com`)
  # [...]

in com.undefinedtea.git.service/docker-compose.yml make sure the following label and environment values reflect your enviornment.

environment:
  GITLAB_OMNIBUS_CONFIG: |
    external_url 'https://git.undefinedtea.com'

    gitlab_rails['gitlab_ssh_host'] = "git.undefinedtea.com"
    gitlab_rails['time_zone'] = 'Europe/Helsinki'

    # [...]

    registry_external_url 'https://docker.git.undefinedtea.com'
    # [...]
    gitlab_rails['api_url'] = 'https://docker.git.undefinedtea.com'

    # [...]
labels:
  # [...]
  - traefik.http.routers.git.rule=Host(`git.undefinedtea.com`)
  # [...]

labels:
  # [...]
  - traefik.http.routers.docker.rule=Host(`docker.git.undefinedtea.com`)
  # [...]

in com.undefinedtea.file.service/docker-compose.yml make sure the following label values reflect your enviornment.

labels:
  # [...]
  - traefik.http.routers.file.rule=Host(`file.undefinedtea.com`)
  # [...]

any instance of data.undefinedtea.com, git.undefinedtea.com, docker.git.undefinedtea.com and git.undefinedtea.com should be replaced with your domain.

then initialise and ammend .env and com.undefinedtea.data.service/cache according to your environment. note that pilot integration and it's coresponging PILOT value in the .env file are optional. again, make sure to replace every value in these files. password is not a secure password. seriously. replace every value.

# edit .env
$ cp e.env .env
$ cp e.git.env .git.env
$ cp e.file.env .file.env

#edit com.undefinedtea.data.service/cache
$ cp com.undefinedtea.data.service/e.cache com.undefinedtea.data.service/cache
$ cp com.undefinedtea.git.service/e.cache com.undefinedtea.git.service/cache

create network interface

to make network interfaces persistent, we create them via terminal.

$ docker network create --driver=bridge --attachable --internal=false traefik
$ docker network create data
$ docker network create git

verify the network interface and ammend TRUSTED_PROXIES in .env accordingly.

$ docker network inspect traefik

create container instance

$ docker-compose --file network.service/docker-compose.yml up --detach
$ docker-compose --file com.undefinedtea.data.service/docker-compose.yml up --detach
$ docker-compose --env-file .git.env --file com.undefinedtea.git.service/docker-compose.yml up --detach
$ docker-compose --env-file .file.env --file com.undefinedtea.file.service/docker-compose.yml up --detach

verify

$ docker ps --all

redis

if you want to flush the cache, the following command will achieve that.

$ docker exec -it cache redis-cli -a password FLUSHALL
$ docker exec -it git-cache redis-cli -a password FLUSHALL

data's People

Watchers

 avatar  avatar

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.