So I stopped on gogs, and here is how I did a setup for it using docker.
So, let's firstly add a docker network for communications between gogs and nginx, which is going to be a front-end web server for all other dockerized services on my machine.
Docker network created, and now it is time to setup a "docker-compose.yml" file for nginx which is going to serv as a front-end server for gogs.
docker network create infrastructure
Now let's create a "./sites-enabled/git.denrox.com" config file, which we are going to place near "docker-compose.yml" for nginx.
version: '3' services: nginx: image: 'nginx:1.13-alpine' restart: always ports: - 80:80 - 443:443 volumes: - ./sites-enabled/git.denrox.com:/etc/nginx/conf.d/git.denrox.com.conf:ro //config file for gogs - ./ssl/live:/etc/ssl:ro //ssh dir location networks: default: external: name: infrastructure //adding to network which we created earlier
And we can not set a "docker-compose.yml" for gogs
Now we can "cd" to "gogs/docker-compose.yml" and run "docker-compose up -d", and then do the same with "nginx/docker-compose.yml".
version: '3' services: postgres: image: postgres:10.2-alpine restart: always environment: - POSTGRES_USER=gogs - POSTGRES_PASSWORD=laden1 - POSTGRES_DB=gogs - PGDATA=/var/lib/postgresql/data/db-files/ volumes: - "./data/db:/var/lib/postgresql/data/" networks: - backend gogs: image: gogs/gogs:latest restart: always hostname: 'gogs' links: - postgres environment: - "RUN_CROND=true" networks: - backend - frontend volumes: - "./data/gogs:/data" depends_on: - postgres networks: backend: driver: bridge frontend: external: name: infrastructure