Advertisement
mpldr

docker-compose.yml

Dec 11th, 2020
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.41 KB | None | 0 0
  1. version: '3'
  2. services:
  3.   gitea:
  4.     image: gitea/gitea:1.12.4
  5.     volumes:
  6.      - ./git/gitea:/data
  7.     ports:
  8.      - "3000:3000"
  9.       - "22:22"
  10.     environment:
  11.      - DB_TYPE=postgres
  12.       - DB_HOST=postgres:5432
  13.       - DB_NAME=gitea
  14.       - DB_USER=gitea
  15.       - DB_PASSWD=${DBPASS}
  16.       - DOMAIN=${SERVERNAME}
  17.       - SSH_DOMAIN=${SERVERNAME}
  18.       - LFS_START_SERVER=true
  19.     depends_on:
  20.      - postgres
  21.     restart: always
  22.  
  23.   postgres:
  24.     image: postgres:13
  25.     restart: always
  26.     environment:
  27.      - POSTGRES_USER=gitea
  28.       - POSTGRES_PASSWORD=${DBPASS}
  29.       - POSTGRES_DB=gitea
  30.     volumes:
  31.      - ./git/postgres/:/var/lib/mysql
  32.  
  33.   ciui:
  34.     image: metroline/ui:latest
  35.     restart: always
  36.     ports:
  37.      - "3002:80"
  38.     environment:
  39.       METROLINE_SERVER_URL: ${PROTOCOL}://${SERVERNAME}:3001${CISUFFIX}
  40.  
  41.   ciserver:
  42.     image: metroline/server:latest
  43.     restart: unless-stopped
  44.     ports:
  45.      - "3001:80"
  46.     environment:
  47.       METROLINE_HOST: ${PROTOCOL}://${SERVERNAME}:3001
  48.       METROLINE_UI_URL: ${PROTOCOL}://${SERVERNAME}:3002${CIUISUFFIX}
  49.       # Generated with "openssl rand -hex 32"
  50.       METROLINE_JWT_SECRET: ${CIJWTSECRET}
  51.       # Generated with "openssl rand -hex 32"
  52.       METROLINE_RUNNER_SECRET: ${CIRUNNERSECRET}
  53.       METROLINE_MONGO_URI: mongodb://mongo:27017/metroline
  54.       METROLINE_GITEA_CLIENT_ID: ${GITEA_CLIENT_ID}
  55.       METROLINE_GITEA_CLIENT_SECRET: ${GITEA_CLIENT_SECRET}
  56.       METROLINE_GITEA_URL: ${PROTOCOL}://${SERVERNAME}
  57.     depends_on:
  58.      - mongo
  59.  
  60.   runner-1:
  61.     image: metroline/runner:latest
  62.     restart: unless-stopped
  63.     environment:
  64.       METROLINE_SERVER_ADDRESS: http://ciserver
  65.       METROLINE_RUNNER_SECRET: ${CIRUNNERSECRET}
  66.     volumes:
  67.      - /var/run/docker.sock:/var/run/docker.sock
  68.  
  69.   mongo:
  70.     image: mongo:4.2-bionic
  71.     restart: unless-stopped
  72.     volumes:
  73.      - ./mongodb:/data/db
  74.   nginx:
  75.     image: pagespeed/nginx-pagespeed:latest
  76.     restart: unless-stopped
  77.     volumes:
  78.      - ./nginx:/etc/nginx/conf.d/
  79.       - ./certbot/www:/var/www/certbot
  80.     ports:
  81.      - "80:80"
  82.       - "443:443"
  83.     command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
  84.   certbot:
  85.     image: certbot/certbot:latest
  86.     restart: unless-stopped
  87.     volumes:
  88.      - ./certbot/conf:/etc/letsencrypt
  89.       - ./certbot/www:/var/www/certbot
  90.     entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement