Adds drone.io for CI

This commit is contained in:
Abhinav Sarkar 2018-08-04 12:13:42 +00:00
parent 20f442e540
commit f71018b740
4 changed files with 64 additions and 0 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ pihole-data
gitea-data gitea-data
matomo-config matomo-config
portainer-data portainer-data
drone-data

View File

@ -24,6 +24,7 @@ services:
- smtp - smtp
volumes: volumes:
- ./wallabag/images:/var/www/wallabag/web/assets/images - ./wallabag/images:/var/www/wallabag/web/assets/images
db: db:
image: postgres:10.4 image: postgres:10.4
restart: always restart: always
@ -31,12 +32,14 @@ services:
POSTGRES_PASSWORD: ${PG_PASSWORD} POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes: volumes:
- ./postgres-data:/var/lib/postgresql/data - ./postgres-data:/var/lib/postgresql/data
mariadb: mariadb:
image: mariadb:10.3 image: mariadb:10.3
environment: environment:
MYSQL_ROOT_PASSWORD: ${MR_PASSWORD} MYSQL_ROOT_PASSWORD: ${MR_PASSWORD}
volumes: volumes:
- ./mariadb-data:/var/lib/mysql - ./mariadb-data:/var/lib/mysql
nginx: nginx:
image: nginx:1.15 image: nginx:1.15
environment: environment:
@ -53,11 +56,13 @@ services:
- ./nginx-log:/var/log/nginx - ./nginx-log:/var/log/nginx
- ./certs:/etc/nginx/certs:ro - ./certs:/etc/nginx/certs:ro
- matomo:/var/www/html - matomo:/var/www/html
smtp: smtp:
build: build:
context: ./smtp context: ./smtp
environment: environment:
MAILNAME: space.abhinavsarkar.net MAILNAME: space.abhinavsarkar.net
pihole: pihole:
image: diginc/pi-hole:debian_v3.3.1 image: diginc/pi-hole:debian_v3.3.1
environment: environment:
@ -73,6 +78,7 @@ services:
volumes: volumes:
- ./pihole-data/pihole:/etc/pihole - ./pihole-data/pihole:/etc/pihole
- ./pihole-data/dnsmasq:/etc/dnsmasq.d - ./pihole-data/dnsmasq:/etc/dnsmasq.d
gitea: gitea:
image: gitea/gitea:1.4 image: gitea/gitea:1.4
environment: environment:
@ -93,22 +99,52 @@ services:
- "222:22" - "222:22"
depends_on: depends_on:
- db - db
site: site:
image: abhin4v/abhinavsarkar.net:latest image: abhin4v/abhinavsarkar.net:latest
hooks: hooks:
build: build:
context: ./webhooks context: ./webhooks
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- .:/opt/space - .:/opt/space
matomo: matomo:
image: matomo:3.5-fpm image: matomo:3.5-fpm
volumes: volumes:
- ./matomo-config:/var/www/html/config - ./matomo-config:/var/www/html/config
- matomo:/var/www/html - matomo:/var/www/html
portainer: portainer:
image: portainer/portainer image: portainer/portainer
command: -H unix:///var/run/docker.sock command: -H unix:///var/run/docker.sock
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ./portainer-data:/data - ./portainer-data:/data
drone-server:
image: drone/drone:0.8
volumes:
- ./drone-data:/var/lib/drone
restart: always
environment:
- DRONE_OPEN=true
- DRONE_GITEA=true
- DRONE_GITEA_URL=https://code.abhinavsarkar.net
- DRONE_HOST=https://drone.abhinavsarkar.net
- DRONE_SECRET=${DRONE_SECRET}
- DRONE_ADMIN=abhin4v
drone-agent:
image: drone/agent:0.8
command: agent
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=${DRONE_SECRET}

26
nginx-conf/drone.conf Normal file
View File

@ -0,0 +1,26 @@
server {
listen 443 ssl;
server_name drone.abhinavsarkar.net;
ssl_certificate /etc/nginx/certs/fullchain1.pem;
ssl_certificate_key /etc/nginx/certs/privkey1.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_pass http://drone-server:8000;
}
}
server {
listen 80;
server_name drone.abhinavsarkar.net;
return 301 https://$host$request_uri;
}

View File

@ -10,6 +10,7 @@ Environment="PH_PASSWORD="
Environment="PH_SERVER_IP=" Environment="PH_SERVER_IP="
Environment="GT_SECRET_KEY=" Environment="GT_SECRET_KEY="
Environment="MR_PASSWORD=" Environment="MR_PASSWORD="
Environment="DRONE_SECRET="
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes
WorkingDirectory=/home/abhinav/space WorkingDirectory=/home/abhinav/space