Former-commit-id: 148d537029fe7c78786e8edcc71928cc43864b96 Former-commit-id: 7df613c436d1465f2ecd603c7fe9e64c843dc2e91.0
parent
2ddb9f4d48
commit
4dfcfc30e0
@ -0,0 +1,18 @@
|
||||
TZ=Asia/Shanghai
|
||||
IP=172.20.32.1
|
||||
PORT=9080
|
||||
#windows:DOCKER_SOCK=//var/run/docker.sock
|
||||
#linux:DOCKER_SOCK=/var/run/docker.sock
|
||||
DOCKER_SOCK=//var/run/docker.sock
|
||||
|
||||
#gitea
|
||||
GITEA_HTTP_PORT=3000
|
||||
GITEA_SSH_PORT=3022
|
||||
|
||||
#drone
|
||||
DRONE_SERVER_HTTP_PORT=9080
|
||||
DRONE_SERVER_HTTPS_PORT=9443
|
||||
DRONE_GITEA_CLIENT_ID=d3348ec2-ec0d-4a76-a80c-c668b7a5b998
|
||||
DRONE_GITEA_CLIENT_SECRET=Tuh4cP1qaDjBb9fVES6fgQb7VXhKzoYttuPvKnqfl-k=
|
||||
DRONE_RPC_SECRET=bea26a2221fd8090ea38720fc445eca6
|
||||
DRONE_SERVER_PROTO=http
|
@ -0,0 +1,4 @@
|
||||
.vscode
|
||||
.env
|
||||
log
|
||||
data
|
@ -0,0 +1 @@
|
||||
|
@ -0,0 +1,16 @@
|
||||
#dnsmasq config, for a complete example, see:
|
||||
# http://oss.segetech.com/intra/srv/dnsmasq.conf
|
||||
#log all dns queries
|
||||
log-queries
|
||||
#dont use hosts nameservers
|
||||
no-resolv
|
||||
#use cloudflare as default nameservers, prefer 1^4
|
||||
server=114.114.114.114
|
||||
server=8.8.8.8
|
||||
strict-order
|
||||
#serve all .company queries using a specific nameserver
|
||||
server=/lan/10.10.14.176
|
||||
#explicitly define host-ip mappings
|
||||
address=/portainer.lan/10.10.14.176
|
||||
address=/netdata.lan/10.10.14.176
|
||||
address=/gitlab.lan/10.10.14.176
|
@ -0,0 +1,19 @@
|
||||
name: default
|
||||
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang
|
||||
commands:
|
||||
- go get
|
||||
- go build
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: octocat/hello-world
|
||||
tags: [ 1, 1.1, latest ]
|
||||
registry: 172.20.32.1:5000
|
||||
insecure: true
|
@ -0,0 +1 @@
|
||||
image: golang:alpine
|
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main(){
|
||||
fmt.Printf("Hello World!");
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
module example
|
||||
|
||||
go 1.14
|
@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name gitlab.lan;
|
||||
|
||||
location / {
|
||||
proxy_pass http://gitlab:9080;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name netdata.lan;
|
||||
|
||||
location / {
|
||||
proxy_pass http://netdata:19999;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name portainer.lan;
|
||||
|
||||
location / {
|
||||
proxy_pass http://portainer:9000;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
user root;
|
||||
worker_processes 4;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name default;
|
||||
absolute_redirect off;
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
include conf.d/*.conf;
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
version: "3.8"
|
||||
networks:
|
||||
default:
|
||||
name: mynetwork
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 172.172.0.0/24
|
||||
services:
|
||||
portainer:
|
||||
image: portainer/portainer-ce:2.5.0
|
||||
restart: always
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 9000:9000
|
||||
volumes:
|
||||
- ${DOCKER_SOCK}:/var/run/docker.sock
|
||||
- ./data/portainer:/data
|
||||
netdata:
|
||||
image: netdata/netdata:v1.30.0
|
||||
restart: always
|
||||
ports:
|
||||
- 19999:19999
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- apparmor:unconfined
|
||||
volumes:
|
||||
- /etc/passwd:/host/etc/passwd:ro
|
||||
- /etc/group:/host/etc/group:ro
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /etc/os-release:/host/etc/os-release:ro
|
||||
registry: #https://docs.docker.com/registry/deploying/
|
||||
image: registry:2.7.1
|
||||
restart: always
|
||||
ports:
|
||||
- 5000:5000 #http://localhost:5000/v2/_catalog
|
||||
volumes:
|
||||
- ./data/registry:/var/lib/registry
|
||||
gitea: # init with ip:port https://docs.gitea.io/en-us/install-with-docker
|
||||
image: gitea/gitea:1.14.2
|
||||
restart: always
|
||||
networks:
|
||||
- default
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
ports:
|
||||
- ${GITEA_HTTP_PORT}:3000
|
||||
- ${GITEA_SSH_PORT}:22
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./data/gitea:/data
|
||||
drone: #https://docs.drone.io/server/provider/gitea/ https://github.com/drone/drone
|
||||
image: drone/drone:2.0.1
|
||||
restart: always
|
||||
ports:
|
||||
- ${DRONE_SERVER_HTTP_PORT}:80
|
||||
- ${DRONE_SERVER_HTTPS_PORT}:443
|
||||
environment:
|
||||
- DRONE_GITEA_SERVER=http://${IP}:3000
|
||||
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
||||
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_SERVER_HOST=${IP}:${DRONE_SERVER_HTTP_PORT}
|
||||
- DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO}
|
||||
volumes:
|
||||
- ./data/drone:/data
|
||||
depends_on:
|
||||
- gitea
|
||||
drone-runner-docker:
|
||||
image: drone/drone-runner-docker:1.6.3
|
||||
restart: always
|
||||
privileged: true
|
||||
ports:
|
||||
- 3001:3000
|
||||
environment:
|
||||
- DRONE_RPC_PROTO=${DRONE_SERVER_PROTO}
|
||||
- DRONE_RPC_HOST=${IP}:${DRONE_SERVER_HTTP_PORT}
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_RUNNER_CAPACITY=2
|
||||
- DRONE_RUNNER_NAME=Local-Runner
|
||||
volumes:
|
||||
- ${DOCKER_SOCK}:/var/run/docker.sock
|
||||
depends_on:
|
||||
- drone
|
||||
# dnsmasq:
|
||||
# image: jpillora/dnsmasq:1.1.0
|
||||
# restart: always
|
||||
# cap_add:
|
||||
# - NET_ADMIN
|
||||
# ports:
|
||||
# - 53:53/udp
|
||||
# - 10000:8080
|
||||
# volumes:
|
||||
# - ./conf/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf
|
||||
# nginx:
|
||||
# image: nginx:1.20.0
|
||||
# restart: always
|
||||
# environment:
|
||||
# TZ: "Asia/Shanghai"
|
||||
# ports:
|
||||
# - 80:80
|
||||
# - 443:443
|
||||
# volumes:
|
||||
# - ./conf/nginx/conf.d:/etc/nginx/conf.d
|
||||
# - ./log/nginx:/var/log/nginx
|
@ -0,0 +1 @@
|
||||
docker-compose up --remove-orphans -d
|
@ -0,0 +1 @@
|
||||
docker-compose down --remove-orphans
|
Loading…
Reference in new issue