version: '3' services: gitea: image: gitea/gitea:1.12.4 volumes: - ./git/gitea:/data ports: - "3000:3000" - "22:22" environment: - DB_TYPE=postgres - DB_HOST=postgres:5432 - DB_NAME=gitea - DB_USER=gitea - DB_PASSWD=${DBPASS} - DOMAIN=${SERVERNAME} - SSH_DOMAIN=${SERVERNAME} - LFS_START_SERVER=true depends_on: - postgres restart: always postgres: image: postgres:13 restart: always environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=${DBPASS} - POSTGRES_DB=gitea volumes: - ./git/postgres/:/var/lib/mysql ciui: image: metroline/ui:latest restart: always ports: - "3002:80" environment: METROLINE_SERVER_URL: ${PROTOCOL}://${SERVERNAME}:3001${CISUFFIX} ciserver: image: metroline/server:latest restart: unless-stopped ports: - "3001:80" environment: METROLINE_HOST: ${PROTOCOL}://${SERVERNAME}:3001 METROLINE_UI_URL: ${PROTOCOL}://${SERVERNAME}:3002${CIUISUFFIX} # Generated with "openssl rand -hex 32" METROLINE_JWT_SECRET: ${CIJWTSECRET} # Generated with "openssl rand -hex 32" METROLINE_RUNNER_SECRET: ${CIRUNNERSECRET} METROLINE_MONGO_URI: mongodb://mongo:27017/metroline METROLINE_GITEA_CLIENT_ID: ${GITEA_CLIENT_ID} METROLINE_GITEA_CLIENT_SECRET: ${GITEA_CLIENT_SECRET} METROLINE_GITEA_URL: ${PROTOCOL}://${SERVERNAME} depends_on: - mongo runner-1: image: metroline/runner:latest restart: unless-stopped environment: METROLINE_SERVER_ADDRESS: http://ciserver METROLINE_RUNNER_SECRET: ${CIRUNNERSECRET} volumes: - /var/run/docker.sock:/var/run/docker.sock mongo: image: mongo:4.2-bionic restart: unless-stopped volumes: - ./mongodb:/data/db nginx: image: pagespeed/nginx-pagespeed:latest restart: unless-stopped volumes: - ./nginx:/etc/nginx/conf.d/ - ./certbot/www:/var/www/certbot ports: - "80:80" - "443:443" command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" certbot: image: certbot/certbot:latest restart: unless-stopped volumes: - ./certbot/conf:/etc/letsencrypt - ./certbot/www:/var/www/certbot entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"