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
matomo-config
portainer-data
drone-data

View File

@ -24,6 +24,7 @@ services:
- smtp
volumes:
- ./wallabag/images:/var/www/wallabag/web/assets/images
db:
image: postgres:10.4
restart: always
@ -31,12 +32,14 @@ services:
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- ./postgres-data:/var/lib/postgresql/data
mariadb:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: ${MR_PASSWORD}
volumes:
- ./mariadb-data:/var/lib/mysql
nginx:
image: nginx:1.15
environment:
@ -53,11 +56,13 @@ services:
- ./nginx-log:/var/log/nginx
- ./certs:/etc/nginx/certs:ro
- matomo:/var/www/html
smtp:
build:
context: ./smtp
environment:
MAILNAME: space.abhinavsarkar.net
pihole:
image: diginc/pi-hole:debian_v3.3.1
environment:
@ -73,6 +78,7 @@ services:
volumes:
- ./pihole-data/pihole:/etc/pihole
- ./pihole-data/dnsmasq:/etc/dnsmasq.d
gitea:
image: gitea/gitea:1.4
environment:
@ -93,22 +99,52 @@ services:
- "222:22"
depends_on:
- db
site:
image: abhin4v/abhinavsarkar.net:latest
hooks:
build:
context: ./webhooks
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .:/opt/space
matomo:
image: matomo:3.5-fpm
volumes:
- ./matomo-config:/var/www/html/config
- matomo:/var/www/html
portainer:
image: portainer/portainer
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./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="GT_SECRET_KEY="
Environment="MR_PASSWORD="
Environment="DRONE_SECRET="
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/abhinav/space