docker-compose.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. version: '3'
  2. networks:
  3. default:
  4. driver: overlay
  5. services:
  6. traefik:
  7. image: traefik:v2.2
  8. ports:
  9. - 80:80
  10. # - 443:443
  11. deploy:
  12. placement:
  13. constraints:
  14. - node.role == manager
  15. labels:
  16. # Enable the dashboard UI
  17. - traefik.enable=true
  18. - traefik.http.routers.api.rule=Host(`board.${DOMAIN}`)
  19. - traefik.http.routers.api.service=api@internal
  20. - traefik.http.routers.api.middlewares=auth
  21. - traefik.http.middlewares.auth.basicauth.users=${TRAEFIK_API_USERS}
  22. # Dummy service for Swarm port detection. The port can be any valid integer value.
  23. - traefik.http.services.dummy-svc.loadbalancer.server.port=9999
  24. - traefik.http.routers.traefik.tls=true
  25. - traefik.http.routers.traefik.tls.certresolver=cloudflare
  26. - traefik.http.routers.traefik.tls.domains[0].main=${DOMAIN}
  27. - traefik.http.routers.traefik.tls.domains[1].sans=*.${DOMAIN}
  28. volumes:
  29. - /var/run/docker.sock:/var/run/docker.sock:ro
  30. - ${CONTAINERS_DIR}/traefik:/certificates
  31. command:
  32. - --providers.docker=true
  33. - --providers.docker.exposedbydefault=false
  34. - --providers.docker.swarmmode=true
  35. - --entrypoints.web.address=:80
  36. #- --entrypoints.web.redirections.entrypoint.permanent=false
  37. #- --entrypoints.web.redirections.entryPoint.to=websecure
  38. #- --entrypoints.web.redirections.entryPoint.scheme=https
  39. #- --entrypoints.websecure.address=:443
  40. #- --certificatesresolvers.le.acme.email=${LETSENCRYPT_EMAIL}
  41. #- --certificatesresolvers.le.acme.storage=/certificates/acme.json
  42. #- --certificatesresolvers.le.acme.dnschallenge.provider=cloudflare
  43. - --accesslog=true
  44. - --log=true
  45. - --api=true
  46. environment:
  47. # - CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
  48. # - CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
  49. # nginx-proxy:
  50. # image: jwilder/nginx-proxy
  51. # # My internet-facing load balancer (CloudFlare) sits on 80 and 443. Therefore,
  52. # # I let it handle all HTTPS concerns.
  53. # #
  54. # # If this is internet-facing, enable SSL in nginx-proxy
  55. # # and forward both 80 and 443 directly.
  56. # ports:
  57. # - "8080:80"
  58. # volumes:
  59. # - /var/run/docker.sock:/tmp/docker.sock:ro
  60. # # Helps with stability of large uploads
  61. # - ./conf.d/proxy_timeout.conf:/etc/nginx/conf.d/proxy_timeout.conf:ro
  62. # - ./conf.d/real_ip.conf:/etc/nginx/conf.d/real_ip.conf:ro
  63. # # Password-protect some subdomains
  64. # - ./htpasswd:/etc/nginx/htpasswd
  65. # # Certs for the top level domain & subdomains
  66. # # - ${TOP_DOMAIN_CERT}:/etc/nginx/certs/jibby.org.crt
  67. # # - ${TOP_DOMAIN_KEY}:/etc/nginx/certs/jibby.org.key
  68. # # - ${WC_DOMAIN_CERT}:/etc/nginx/certs/shared.crt
  69. # # - ${WC_DOMAIN_KEY}:/etc/nginx/certs/shared.key
  70. # environment:
  71. # - DEFAULT_HOST=jibby.org
  72. # restart: always
  73. # An example of a static HTTP file hosting site
  74. camera:
  75. image: nginx
  76. volumes:
  77. - ${MEDIA_DIR}/Camera:/home/app:ro
  78. - ./conf.d/static.conf:/etc/nginx/sites-enabled/default
  79. - ./conf.d/static.conf:/etc/nginx/conf.d/default.conf
  80. environment:
  81. - VIRTUAL_HOST=camera.jibby.org
  82. - CERT_NAME=shared
  83. restart: always
  84. postgres:
  85. image: postgres:10.5
  86. volumes:
  87. - ${CONTAINERS_DIR}/postgres/data:/var/lib/postgresql/data
  88. - ${CONTAINERS_DIR}/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
  89. environment:
  90. - POSTGRES_USER=${POSTGRES_USER}
  91. - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
  92. restart: always
  93. jekyll:
  94. image: jibby0/docker-jekyll-webhook
  95. deploy:
  96. labels:
  97. - traefik.enable=true
  98. - traefik.http.services.jekyll.loadbalancer.server.port=80
  99. - traefik.http.routers.jekyll.rule=Host(`${DOMAIN}`)
  100. environment:
  101. - TZ=America/New_York
  102. - WEBHOOK_SECRET=${WEBHOOK_SECRET}
  103. - REPO=https://github.com/jibby0/blog.git
  104. restart: always
  105. volumes:
  106. - ${CONTAINERS_DIR}/jekyll/vendor_cache:/vendor
  107. nextcloud:
  108. image: nextcloud
  109. deploy:
  110. labels:
  111. - traefik.enable=true
  112. - traefik.http.services.nextcloud.loadbalancer.server.port=80
  113. - traefik.http.routers.nextcloud.rule=Host(`nextcloud.${DOMAIN}`)
  114. expose:
  115. - "80"
  116. links:
  117. - postgres
  118. volumes:
  119. - ${CONTAINERS_DIR}/nextcloud:/var/www/html
  120. environment:
  121. - VIRTUAL_HOST=nextcloud.jibby.org
  122. - VIRTUAL_PORT=80
  123. - CERT_NAME=shared
  124. restart: always
  125. gogs:
  126. image: gogs/gogs
  127. expose:
  128. - "3000"
  129. volumes:
  130. - ${CONTAINERS_DIR}/gogs:/data
  131. # NOTE: My gogs instance isn't happy with postgres. For now, it's a small server
  132. # and sqlite is fine, but I should fix this eventually.
  133. #links:
  134. # - postgres
  135. environment:
  136. - VIRTUAL_HOST=gogs.jibby.org
  137. - VIRTUAL_PORT=3000
  138. - CERT_NAME=shared
  139. restart: always
  140. matrix:
  141. image: matrixdotorg/synapse
  142. expose:
  143. - "8008"
  144. links:
  145. - postgres
  146. environment:
  147. # NOTE: These don't directly configure anything anymore.
  148. # They can be used with `migrate_config` to build
  149. # homeserver.yaml
  150. # - SYNAPSE_SERVER_NAME=matrix.jibby.org
  151. # - SYNAPSE_REPORT_STATS=no
  152. # - SYNAPSE_NO_TLS=true
  153. # - SYNAPSE_ENABLE_REGISTRATION=no
  154. # - SYNAPSE_LOG_LEVEL=INFO
  155. # - SYNAPSE_REGISTRATION_SHARED_SECRET=${POSTGRES_PASSWORD}
  156. # - POSTGRES_DB=synapse
  157. # - POSTGRES_HOST=postgres
  158. # - POSTGRES_USER=synapse
  159. # - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
  160. - VIRTUAL_HOST=matrix.jibby.org
  161. - VIRTUAL_PROTO=http
  162. - VIRTUAL_PORT=8008
  163. volumes:
  164. - ${CONTAINERS_DIR}/matrix:/data
  165. restart: always
  166. keeweb:
  167. image: antelle/keeweb
  168. expose:
  169. - "443"
  170. environment:
  171. - VIRTUAL_HOST=keeweb.jibby.org
  172. - VIRTUAL_PROTO=https
  173. - VIRTUAL_PORT=443
  174. - CERT_NAME=shared
  175. restart: always
  176. selfoss:
  177. image: hardware/selfoss
  178. expose:
  179. - "8888"
  180. links:
  181. - postgres
  182. volumes:
  183. - ${CONTAINERS_DIR}/selfoss:/selfoss/data
  184. environment:
  185. - CRON_PERIOD=5m
  186. - VIRTUAL_HOST=selfoss.jibby.org
  187. - VIRTUAL_PORT=8888
  188. - CERT_NAME=shared
  189. restart: always
  190. jellyfin:
  191. image: jellyfin/jellyfin
  192. expose:
  193. - "8096"
  194. volumes:
  195. - ${CONTAINERS_DIR}/jellyfin:/config
  196. - ${MEDIA_DIR}:/media
  197. - /dev/shm/jellyfin-transcodes:/transcodes
  198. - /dev/shm/jellyfin-cache:/cache
  199. environment:
  200. - VIRTUAL_HOST=jellyfin.jibby.org
  201. - VIRTUAL_PORT=8096
  202. - CERT_NAME=shared
  203. restart: always
  204. # Currently unused container configs:
  205. # plex:
  206. # image: plexinc/pms-docker
  207. # expose:
  208. # - "32400"
  209. # volumes:
  210. # - ${CONTAINERS_DIR}/plex:/config
  211. # - /tmp/plex:/transcode
  212. # - ${MEDIA_DIR}:/data
  213. # environment:
  214. # - PLEX_CLAIM="claim-pPM26k9y5p8hcbpnjzAq"
  215. # - VIRTUAL_HOST=plex.jossh.us,plex.jibby.org
  216. # - VIRTUAL_PORT=32400
  217. # - TZ="America/New_York"
  218. # restart: always
  219. # znc:
  220. # image: znc
  221. # expose:
  222. # - "6697"
  223. # ports:
  224. # - "6697:6697"
  225. # volumes:
  226. # - ${CONTAINERS_DIR}/znc:/home/znc/.znc
  227. # environment:
  228. # - VIRTUAL_HOST=znc.jossh.us
  229. # - LETSENCRYPT_HOST=znc.jossh.us
  230. # - VIRTUAL_PORT=6697
  231. # - VIRTUAL_PROTO=https
  232. # - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
  233. # restart: always
  234. # gitlab:
  235. # image: gitlab/gitlab-ce
  236. # expose:
  237. # - "80"
  238. # - "22"
  239. # # Gitlab destroys databases when seeding them, and requires an admin user for seeding. So let's not link it to the running postgres instance.
  240. # environment:
  241. # - VIRTUAL_HOST=gitlab.jossh.us
  242. # - VIRTUAL_PORT=80
  243. # - LETSENCRYPT_HOST=gitlab.jossh.us
  244. # - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
  245. # volumes:
  246. # - ${CONTAINERS_DIR}/gitlab/config:/etc/gitlab
  247. # - ${CONTAINERS_DIR}/gitlab/logs:/var/log/gitlab
  248. # - ${CONTAINERS_DIR}/gitlab/data:/var/opt/gitlab
  249. # restart: always
  250. # libresonic:
  251. # image: linuxserver/libresonic
  252. # expose:
  253. # - "4040"
  254. # volumes:
  255. # - ${CONTAINERS_DIR}/libresonic:/config
  256. # - ${MEDIA_DIR}/Music:/music
  257. # environment:
  258. # - VIRTUAL_HOST=libresonic.josh1147582.jumpingcrab.com,libresonic.jossh.us
  259. # - LETSENCRYPT_HOST=libresonic.josh1147582.jumpingcrab.com,libresonic.jossh.us
  260. # - VIRTUAL_PORT=4040
  261. # - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
  262. # - TZ=America/New_York
  263. # restart: always
  264. # quassel:
  265. # image: linuxserver/quassel-core
  266. # expose:
  267. # - "4242"
  268. # links:
  269. # - postgres
  270. # volumes:
  271. # - ${CONTAINERS_DIR}/quassel:/config
  272. # - /etc/localtime:/etc/localtime:ro
  273. # environment:
  274. # - PGID=1000
  275. # - PUID=1000
  276. # - VIRTUAL_HOST=quassel.jossh.us,quassel.jibby.org
  277. # - VIRTUAL_PORT=4242
  278. # restart: always
  279. # quassel-webserver:
  280. # image: bodsch/docker-quassel-web
  281. # expose:
  282. # - "64080"
  283. # #ports:
  284. # # port- "8080:64080"
  285. # links:
  286. # - quassel
  287. # environment:
  288. # - QUASSEL_HOST=quassel
  289. # - QUASSEL_PORT=4242
  290. # - FORCE_DEFAULT=true
  291. # - WEBSERVER_MODE=http
  292. # - VIRTUAL_HOST=quassel-web.jossh.us,quassel-web.jibby.org
  293. # - VIRTUAL_PORT=64080
  294. # restart: always
  295. # netdata:
  296. # image: titpetric/netdata
  297. # privileged: true
  298. # hostname: cumulus-monitor
  299. # expose:
  300. # - "19999"
  301. # volumes:
  302. # - /proc:/host/proc:ro
  303. # - /sys:/host/sys:ro
  304. # - ${CONTAINERS_DIR}/netdata/health_alarm_notify.conf:/etc/netdata/health_alarm_notify.conf
  305. # - ${CONTAINERS_DIR}/netdata/conf.d/:/usr/lib/netdata/conf.d/
  306. # environment:
  307. # - VIRTUAL_HOST=netdata.jibby.org
  308. # - VIRTUAL_PORT=19999
  309. # - CERT_NAME=shared
  310. # - SMTP_TO=${LETSENCRYPT_EMAIL}
  311. # - SMTP_FROM=${SMTP_USER}
  312. # - SMTP_USER=${SMTP_USER}
  313. # - SMTP_PASS=${SMTP_PASS}
  314. # restart: always
  315. # wordpress:
  316. # image: wordpress
  317. # links:
  318. # - mariadb:mysql
  319. # volumes:
  320. # - ${CONTAINERS_DIR}/wordpress:/var/www/html
  321. # environment:
  322. # - WORDPRESS_DB_USER=${MARIADB_USER}
  323. # - WORDPRESS_DB_PASSWORD=${MARIADB_PASSWORD}
  324. # - VIRTUAL_HOST=jibby.org
  325. # - VIRTUAL_PORT=3000
  326. # restart: always
  327. # mariadb:
  328. # image: mariadb
  329. # volumes:
  330. # - ${CONTAINERS_DIR}/mariadb:/var/lib/mysql
  331. # environment:
  332. # # If mariadb is used for more than wordpress in the future, it'll need
  333. # # its own /docker-entrypoint-initdb.d entry. But for now, envrionment
  334. # # variables are fine.
  335. # - MYSQL_DATABASE=wordpress
  336. # - MYSQL_USER=${MARIADB_USER}
  337. # - MYSQL_PASSWORD=${MARIADB_PASSWORD}
  338. # - MYSQL_ROOT_PASSWORD=${MARIADB_PASSWORD}
  339. # restart: always
  340. ### Mastodon
  341. #
  342. # redis:
  343. # restart: always
  344. # image: redis:4.0-alpine
  345. # healthcheck:
  346. # test: ["CMD", "redis-cli", "ping"]
  347. # volumes:
  348. # - ${CONTAINERS_DIR}/redis:/data
  349. #
  350. # mastodon-web:
  351. # #build: ./docker-mastodon
  352. # image: tootsuite/mastodon
  353. # restart: always
  354. # env_file: .env.mastodon
  355. # environment:
  356. # - VIRTUAL_HOST=mastodon.jibby.org
  357. # - VIRTUAL_PORT=3000
  358. # #- VIRTUAL_PROTO=https
  359. # command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
  360. # healthcheck:
  361. # test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy off localhost:3000/api/v1/instance || exit 1"]
  362. # # ports:
  363. # # - "127.0.0.1:3000:3000"
  364. # expose:
  365. # - "3000"
  366. # depends_on:
  367. # - postgres
  368. # - redis
  369. # - es
  370. # volumes:
  371. # - ${CONTAINERS_DIR}/mastodon-web/public/system:/mastodon/public/system
  372. #
  373. # mastodon-streaming:
  374. # #build: ./docker-mastodon
  375. # image: tootsuite/mastodon
  376. # restart: always
  377. # env_file: .env.mastodon
  378. # command: yarn start
  379. # healthcheck:
  380. # test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy off localhost:4000/api/v1/streaming/health || exit 1"]
  381. # # ports:
  382. # # - "127.0.0.1:4000:4000"
  383. # expose:
  384. # - "4000"
  385. # depends_on:
  386. # - postgres
  387. # - redis
  388. #
  389. # mastodon-sidekiq:
  390. # #build: ./docker-mastodon
  391. # image: tootsuite/mastodon
  392. # restart: always
  393. # env_file: .env.mastodon
  394. # command: bundle exec sidekiq
  395. # depends_on:
  396. # - postgres
  397. # - redis
  398. # volumes:
  399. # - ${CONTAINERS_DIR}/mastodon-sidekiq/public/system:/mastodon/public/system