Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2019
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.24 KB | None | 0 0
  1. ##
  2. ## -------------------------
  3. ## | D E V I L S T A C K |
  4. ## -------------------------
  5. ##
  6. ## Local LAMP/LEMP stack
  7. ##
  8. ##
  9. ## ${VARIABLE:-default} will evaluate to default if VARIABLE is unset or empty in the environment.
  10. ## ${VARIABLE-default} will evaluate to default only if VARIABLE is unset in the environment.
  11. ##
  12. ##
  13. ## -- DO NOT EDIT THIS FILE --
  14. ##
  15. ## Copy 'docker-compose.override.yml-example' to 'docker-compose.override.yml'
  16. ## and edit this file with your custom changes (override or even new services).
  17. ##
  18. ## Edit '.env' for configuration.
  19. ##
  20. ## If '.env' does not exist, copy 'env-example' to '.env'
  21. ## $ cp env-example .env
  22. ##
  23.  
  24.  
  25. version: '2.1'
  26.  
  27.  
  28. ################################################################################
  29. # SERVICES
  30. ################################################################################
  31. services:
  32.  
  33. # ------------------------------------------------------------
  34. # Bind (DNS Server)
  35. # ------------------------------------------------------------
  36. bind:
  37. image: cytopia/bind:0.15
  38. hostname: bind
  39. restart: always
  40. ports:
  41. # [local-machine:]local-port:docker-port
  42. - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/tcp"
  43. - "${LOCAL_LISTEN_ADDR}${HOST_PORT_BIND:-1053}:53/udp"
  44.  
  45. environment:
  46. ##
  47. ## Debug?
  48. ##
  49. - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
  50.  
  51. ##
  52. ## Bind wildcard/host settings
  53. ##
  54. - WILDCARD_DNS=${TLD_SUFFIX:-loc}=127.0.0.1
  55. - EXTRA_HOSTS=${EXTRA_HOSTS}
  56.  
  57. ##
  58. ## Forwarding
  59. ##
  60. - DNS_FORWARDER=${BIND_DNS_RESOLVER:-8.8.8.8,8.8.4.4}
  61.  
  62. ##
  63. ## Security
  64. ##
  65. - DNSSEC_VALIDATE=${BIND_DNSSEC_VALIDATE:-no}
  66.  
  67. ##
  68. ## Time settings
  69. ##
  70. - TTL_TIME=${BIND_TTL_TIME}
  71. - REFRESH_TIME=${BIND_REFRESH_TIME}
  72. - RETRY_TIME=${BIND_RETRY_TIME}
  73. - EXPIRY_TIME=${BIND_EXPIRY_TIME}
  74. - MAX_CACHE_TIME=${BIND_MAX_CACHE_TIME}
  75.  
  76. ##
  77. ## Query log
  78. ##
  79. - DOCKER_LOGS=${BIND_LOG_DNS_QUERIES}
  80.  
  81. dns:
  82. - 127.0.0.1
  83.  
  84. # MacOS and Windows have this by default, this hack also allows it for Linux
  85. extra_hosts:
  86. docker.for.lin.host.internal: 172.16.239.1
  87. docker.for.lin.localhost: 172.16.239.1
  88.  
  89. networks:
  90. app_net:
  91. ipv4_address: 172.16.239.100
  92.  
  93.  
  94. # ------------------------------------------------------------
  95. # PHP
  96. # ------------------------------------------------------------
  97. php:
  98. image: devilbox/php-fpm:${PHP_SERVER}-work-0.65
  99. hostname: php
  100.  
  101. ##
  102. ## All .env variables
  103. ##
  104. ## Source all variables defined in .env
  105. ## This also makes any custom variable available in each PHP/HHVM container
  106. ##
  107. env_file:
  108. - ./.env
  109.  
  110. environment:
  111. ##
  112. ## Debug/Logging
  113. ##
  114. - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
  115. - DEBUG_COMPOSE_ENTRYPOINT
  116. - DOCKER_LOGS
  117.  
  118. ##
  119. ## UserID and GroupID
  120. ##
  121. - NEW_UID
  122. - NEW_GID
  123.  
  124. ##
  125. ## Adjust timezone
  126. ##
  127. - TIMEZONE
  128.  
  129. ##
  130. ## Enable/Disable PHP Modules
  131. ##
  132. - ENABLE_MODULES=${PHP_MODULES_ENABLE}
  133. - DISABLE_MODULES=${PHP_MODULES_DISABLE}
  134.  
  135. ##
  136. ## Mail-catching
  137. ##
  138. - ENABLE_MAIL=1
  139.  
  140. ##
  141. ## Enable 127.0.0.1 Port-forwarding
  142. ##
  143. - FORWARD_PORTS_TO_LOCALHOST=80:httpd:80,443:httpd:443,3306:mysql:3306,5432:pgsql:5432,6379:redis:6379,11211:memcd:11211,27017:mongo:27017
  144.  
  145. ##
  146. ## MySQL Backups
  147. ##
  148. - MYSQL_BACKUP_USER=root
  149. - MYSQL_BACKUP_PASS=${MYSQL_ROOT_PASSWORD}
  150. - MYSQL_BACKUP_HOST=mysql
  151.  
  152. dns:
  153. - 172.16.239.100
  154.  
  155. # MacOS and Windows have this by default, this hack also allows it for Linux
  156. extra_hosts:
  157. docker.for.lin.host.internal: 172.16.239.1
  158. docker.for.lin.localhost: 172.16.239.1
  159.  
  160. networks:
  161. app_net:
  162. ipv4_address: 172.16.239.10
  163.  
  164. volumes:
  165. # ---- Format: ----
  166. # HOST-DIRECTORY : DOCKER-DIRECTORY
  167.  
  168. # Mount custom intranet
  169. - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}
  170.  
  171. # Mount custom mass virtual hosting
  172. - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
  173.  
  174. # Mount logs
  175. - ${DEVILBOX_PATH}/log/php-fpm-${PHP_SERVER}:/var/log/php:rw${MOUNT_OPTIONS}
  176.  
  177. # Mount Mail directory
  178. - ${DEVILBOX_PATH}/mail:/var/mail:rw${MOUNT_OPTIONS}
  179.  
  180. # Mount DB Backup directory
  181. - ${DEVILBOX_PATH}/backups:/shared/backups:rw${MOUNT_OPTIONS}
  182.  
  183. # Mount devilbox user-defined *.ini files in order
  184. # to overwrite the default PHP.ini configuration
  185. - ${DEVILBOX_PATH}/cfg/php-ini-${PHP_SERVER}:/etc/php-custom.d:ro${MOUNT_OPTIONS}
  186.  
  187. # Mount devilbox user-defined PHP-FPM *.conf files in order
  188. # to overwrite the default PHP-FPM configuration
  189. - ${DEVILBOX_PATH}/cfg/php-fpm-${PHP_SERVER}:/etc/php-fpm-custom.d:ro${MOUNT_OPTIONS}
  190.  
  191. # Mount devilbox user-defined *.so files in order
  192. # to load custom PHP modules
  193. - ${DEVILBOX_PATH}/mod/php-fpm-${PHP_SERVER}:/usr/lib64/php/custom-modules:ro${MOUNT_OPTIONS}
  194.  
  195. # Mount devilbox user-defined PHP-FPM startup *.sh scripts
  196. - ${DEVILBOX_PATH}/cfg/php-startup-${PHP_SERVER}:/startup.1.d:rw${MOUNT_OPTIONS}
  197. - ${DEVILBOX_PATH}/autostart:/startup.2.d:rw${MOUNT_OPTIONS}
  198.  
  199. # Mount devilbox user-defined bash config
  200. - ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d:rw${MOUNT_OPTIONS}
  201.  
  202. # Certificate Authority public key
  203. - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
  204.  
  205. depends_on:
  206. - bind
  207.  
  208.  
  209. # ------------------------------------------------------------
  210. # Web Server
  211. # ------------------------------------------------------------
  212. httpd:
  213. image: devilbox/${HTTPD_SERVER}:0.25
  214. hostname: httpd
  215.  
  216. environment:
  217.  
  218. ##
  219. ## Debug/Logging
  220. ##
  221. - DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
  222. - DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT}
  223. - DOCKER_LOGS
  224.  
  225. ##
  226. ## Adjust timezone
  227. ##
  228. - TIMEZONE
  229.  
  230. ##
  231. ## UserID and GroupID
  232. ##
  233. - NEW_UID
  234. - NEW_GID
  235.  
  236. ##
  237. ## Disable default vhost?
  238. ##
  239. - MAIN_VHOST_ENABLE=${DEVILBOX_UI_ENABLE}
  240. - MAIN_VHOST_STATUS_ENABLE=1
  241. - MAIN_VHOST_STATUS_ALIAS=/devilbox-httpd-status
  242. - MAIN_VHOST_SSL_TYPE=both
  243. - MAIN_VHOST_SSL_GEN=1
  244. - MAIN_VHOST_SSL_CN=${DEVILBOX_UI_SSL_CN:-localhost}
  245.  
  246. ##
  247. ## Enable Mass Vhosts
  248. ##
  249. - MASS_VHOST_ENABLE=1
  250. - MASS_VHOST_TLD=.${TLD_SUFFIX}
  251. - MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR}
  252. - MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
  253. - MASS_VHOST_SSL_TYPE=both
  254. - MASS_VHOST_SSL_GEN=1
  255.  
  256. ##
  257. ## PHP-FPM Remote Server
  258. ##
  259. - COMPAT=${PHP_SERVER}
  260. - PHP_FPM_ENABLE=1
  261. - PHP_FPM_SERVER_ADDR=php
  262. - PHP_FPM_SERVER_PORT=9000
  263. - PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}
  264.  
  265. ports:
  266. # ---- Format: ----
  267. # [HOST-ADDR : ] HOST-PORT : DOCKER-PORT
  268. - "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD}:80"
  269. - "${LOCAL_LISTEN_ADDR}${HOST_PORT_HTTPD_SSL}:443"
  270.  
  271. networks:
  272. app_net:
  273. ipv4_address: 172.16.239.11
  274.  
  275. volumes:
  276. # ---- Format: ----
  277. # HOST-DIRECTORY : DOCKER-DIRECTORY
  278.  
  279. # Mount custom intranet
  280. - ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro${MOUNT_OPTIONS}
  281.  
  282. # Mount custom mass virtual hosting
  283. - ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:rw${MOUNT_OPTIONS}
  284.  
  285. # Mount custom web server config directory
  286. - ${DEVILBOX_PATH}/cfg/${HTTPD_SERVER}:/etc/httpd-custom.d:rw${MOUNT_OPTIONS}
  287.  
  288. # Mount custom vhost-templates
  289. - ${DEVILBOX_PATH}/cfg/vhost-gen:/etc/vhost-gen.d:rw${MOUNT_OPTIONS}
  290.  
  291. # Mount logs
  292. - ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}:rw${MOUNT_OPTIONS}
  293.  
  294. # Certificate Authority public key
  295. - ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
  296.  
  297. depends_on:
  298. - bind
  299. - php
  300.  
  301.  
  302. # # ------------------------------------------------------------
  303. # # MySQL Database
  304. # # ------------------------------------------------------------
  305. # mysql:
  306. # image: cytopia/${MYSQL_SERVER}:latest
  307. # hostname: mysql
  308.  
  309. # environment:
  310.  
  311. # ##
  312. # ## Debug?
  313. # ##
  314. # - DEBUG_COMPOSE_ENTRYPOINT
  315.  
  316. # ##
  317. # ## Adjust timezone
  318. # ##
  319. # - TIMEZONE
  320.  
  321. # ##
  322. # ## Adjust Root password
  323. # ##
  324. # - MYSQL_ROOT_PASSWORD
  325.  
  326. # ##
  327. # ## Socket directory Path
  328. # ##
  329. # - MYSQL_SOCKET_DIR=/tmp/mysql
  330.  
  331. # ##
  332. # ## Runtime settings
  333. # ##
  334. # - MYSQL_GENERAL_LOG=${MYSQL_GENERAL_LOG}
  335.  
  336. # ports:
  337. # # [local-machine:]local-port:docker-port
  338. # - "${LOCAL_LISTEN_ADDR}${HOST_PORT_MYSQL}:3306"
  339.  
  340. # networks:
  341. # app_net:
  342. # ipv4_address: 172.16.239.12
  343.  
  344. # volumes:
  345. # # ---- Format: ----
  346. # # HOST-DIRECTORY : DOCKER-DIRECTORY
  347.  
  348. # # Mount logs
  349. # - ${DEVILBOX_PATH}/log/${MYSQL_SERVER}:/var/log/mysql:rw${MOUNT_OPTIONS}
  350.  
  351. # # Mount devilbox default overwrites
  352. # - ${DEVILBOX_PATH}/.devilbox/etc/${MYSQL_SERVER}:/etc/mysql/conf.d:ro${MOUNT_OPTIONS}
  353.  
  354. # # Mount devilbox user-defined cnf files in order
  355. # # to overwrite the MySQL server configuration
  356. # - ${DEVILBOX_PATH}/cfg/${MYSQL_SERVER}:/etc/mysql/docker-default.d:ro${MOUNT_OPTIONS}
  357.  
  358. # # Mount MySQL Data directory
  359. # - ${HOST_PATH_MYSQL_DATADIR}/${MYSQL_SERVER}:/var/lib/mysql:rw${MOUNT_OPTIONS}
  360.  
  361. # depends_on:
  362. # - bind
  363. # - php
  364. # - httpd
  365.  
  366.  
  367. # # ------------------------------------------------------------
  368. # # PostgreSQL
  369. # # ------------------------------------------------------------
  370. # pgsql:
  371. # image: postgres:${PGSQL_SERVER}
  372. # hostname: pgsql
  373.  
  374. # environment:
  375.  
  376. # - POSTGRES_USER=${PGSQL_ROOT_USER}
  377. # - POSTGRES_PASSWORD=${PGSQL_ROOT_PASSWORD}
  378. # - PGDATA=/var/lib/postgresql/data/pgdata
  379.  
  380. # ports:
  381. # # [local-machine:]local-port:docker-port
  382. # - "${LOCAL_LISTEN_ADDR}${HOST_PORT_PGSQL}:5432"
  383.  
  384. # networks:
  385. # app_net:
  386. # ipv4_address: 172.16.239.13
  387.  
  388. # volumes:
  389. # # ---- Format: ----
  390. # # HOST-DIRECTORY : DOCKER-DIRECTORY
  391.  
  392. # # Mount logs
  393. # - ${DEVILBOX_PATH}/log/pgsql-${PGSQL_SERVER}:/var/log/postgresql:rw${MOUNT_OPTIONS}
  394.  
  395. # # Mount PostgreSQL Data directory
  396. # - ${HOST_PATH_PGSQL_DATADIR}/${PGSQL_SERVER}:/var/lib/postgresql/data/pgdata:rw${MOUNT_OPTIONS}
  397.  
  398. # depends_on:
  399. # - bind
  400. # - php
  401. # - httpd
  402.  
  403.  
  404. # ------------------------------------------------------------
  405. # Redis
  406. # ------------------------------------------------------------
  407. redis:
  408. image: redis:${REDIS_SERVER}
  409. hostname: redis
  410.  
  411. # Apply custom arguments to redis startup
  412. command: redis-server ${REDIS_ARGS:- }
  413. environment:
  414. - REDIS_ARGS=${REDIS_ARGS:- }
  415.  
  416. ports:
  417. # [local-machine:]local-port:docker-port
  418. - "${LOCAL_LISTEN_ADDR}${HOST_PORT_REDIS}:6379"
  419.  
  420. networks:
  421. app_net:
  422. ipv4_address: 172.16.239.14
  423.  
  424. volumes:
  425. # ---- Format: ----
  426. # HOST-DIRECTORY : DOCKER-DIRECTORY
  427.  
  428. # Mount logs
  429. - ${DEVILBOX_PATH}/log/redis-${REDIS_SERVER}:/var/log/redis:rw${MOUNT_OPTIONS}
  430.  
  431. depends_on:
  432. - bind
  433. - php
  434. - httpd
  435.  
  436.  
  437. # # ------------------------------------------------------------
  438. # # Memcached
  439. # # ------------------------------------------------------------
  440. # memcd:
  441. # image: memcached:${MEMCD_SERVER}
  442. # hostname: memcd
  443.  
  444. # ports:
  445. # # [local-machine:]local-port:docker-port
  446. # - "${LOCAL_LISTEN_ADDR}${HOST_PORT_MEMCD}:11211"
  447.  
  448. # networks:
  449. # app_net:
  450. # ipv4_address: 172.16.239.15
  451.  
  452. # volumes:
  453. # # ---- Format: ----
  454. # # HOST-DIRECTORY : DOCKER-DIRECTORY
  455.  
  456. # # Mount logs
  457. # - ${DEVILBOX_PATH}/log/memcd-${MEMCD_SERVER}:/var/log/memcd:rw${MOUNT_OPTIONS}
  458.  
  459. # depends_on:
  460. # - bind
  461. # - php
  462. # - httpd
  463.  
  464.  
  465. # # ------------------------------------------------------------
  466. # # MongoDB
  467. # # ------------------------------------------------------------
  468. # mongo:
  469. # image: mongo:${MONGO_SERVER}
  470. # hostname: mongo
  471.  
  472. # ports:
  473. # # [local-machine:]local-port:docker-port
  474. # - "${LOCAL_LISTEN_ADDR}${HOST_PORT_MONGO}:27017"
  475.  
  476. # networks:
  477. # app_net:
  478. # ipv4_address: 172.16.239.16
  479.  
  480. # volumes:
  481. # # ---- Format: ----
  482. # # HOST-DIRECTORY : DOCKER-DIRECTORY
  483.  
  484. # # Mount MongoDB Data directory
  485. # - ${HOST_PATH_MONGO_DATADIR}/${MONGO_SERVER}:/data/db:rw${MOUNT_OPTIONS}
  486.  
  487. # depends_on:
  488. # - bind
  489. # - php
  490. # - httpd
  491.  
  492.  
  493. ################################################################################
  494. # NETWORK
  495. ################################################################################
  496. networks:
  497. app_net:
  498. driver: bridge
  499. driver_opts:
  500. com.docker.network.enable_ipv6: "false"
  501. ipam:
  502. driver: default
  503. config:
  504. - subnet: 172.16.239.0/24
  505. gateway: 172.16.239.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement