docker-compose.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. version: '3'
  2. services:
  3. shlink_nginx:
  4. container_name: shlink_nginx
  5. image: nginx:1.19.6-alpine
  6. ports:
  7. - "8000:80"
  8. volumes:
  9. - ./:/home/shlink/www
  10. - ./docs:/home/shlink/www/public/docs
  11. - ./data/infra/vhost.conf:/etc/nginx/conf.d/default.conf
  12. links:
  13. - shlink_php
  14. shlink_php:
  15. container_name: shlink_php
  16. build:
  17. context: .
  18. dockerfile: ./data/infra/php.Dockerfile
  19. volumes:
  20. - ./:/home/shlink/www
  21. - ./data/infra/php.ini:/usr/local/etc/php/php.ini
  22. links:
  23. - shlink_db
  24. - shlink_db_postgres
  25. - shlink_db_maria
  26. - shlink_db_ms
  27. - shlink_redis
  28. - shlink_mercure
  29. - shlink_mercure_proxy
  30. environment:
  31. LC_ALL: C
  32. shlink_swoole_proxy:
  33. container_name: shlink_swoole_proxy
  34. image: nginx:1.19.6-alpine
  35. ports:
  36. - "8002:80"
  37. volumes:
  38. - ./:/home/shlink/www
  39. - ./data/infra/swoole_proxy_vhost.conf:/etc/nginx/conf.d/default.conf
  40. links:
  41. - shlink_swoole
  42. shlink_swoole:
  43. container_name: shlink_swoole
  44. build:
  45. context: .
  46. dockerfile: ./data/infra/swoole.Dockerfile
  47. ports:
  48. - "8080:8080"
  49. - "9001:9001"
  50. volumes:
  51. - ./:/home/shlink
  52. - ./data/infra/php.ini:/usr/local/etc/php/php.ini
  53. links:
  54. - shlink_db
  55. - shlink_db_postgres
  56. - shlink_db_maria
  57. - shlink_db_ms
  58. - shlink_redis
  59. - shlink_mercure
  60. - shlink_mercure_proxy
  61. environment:
  62. LC_ALL: C
  63. shlink_db:
  64. container_name: shlink_db
  65. image: mysql:5.7
  66. ports:
  67. - "3307:3306"
  68. volumes:
  69. - ./:/home/shlink/www
  70. - ./data/infra/database:/var/lib/mysql
  71. environment:
  72. MYSQL_ROOT_PASSWORD: root
  73. MYSQL_DATABASE: shlink
  74. shlink_db_postgres:
  75. container_name: shlink_db_postgres
  76. image: postgres:12.2-alpine
  77. ports:
  78. - "5433:5432"
  79. volumes:
  80. - ./:/home/shlink/www
  81. - ./data/infra/database_pg:/var/lib/postgresql/data
  82. environment:
  83. POSTGRES_PASSWORD: root
  84. POSTGRES_DB: shlink
  85. PGDATA: /var/lib/postgresql/data/pgdata
  86. shlink_db_maria:
  87. container_name: shlink_db_maria
  88. image: mariadb:10.5
  89. ports:
  90. - "3308:3306"
  91. volumes:
  92. - ./:/home/shlink/www
  93. - ./data/infra/database_maria:/var/lib/mysql
  94. environment:
  95. MYSQL_ROOT_PASSWORD: root
  96. MYSQL_DATABASE: shlink
  97. MYSQL_INITDB_SKIP_TZINFO: 1
  98. shlink_db_ms:
  99. container_name: shlink_db_ms
  100. image: mcr.microsoft.com/mssql/server:2019-latest
  101. ports:
  102. - "1433:1433"
  103. environment:
  104. ACCEPT_EULA: Y
  105. SA_PASSWORD: "Passw0rd!"
  106. shlink_redis:
  107. container_name: shlink_redis
  108. image: redis:6.0-alpine
  109. ports:
  110. - "6380:6379"
  111. shlink_mercure_proxy:
  112. container_name: shlink_mercure_proxy
  113. image: nginx:1.19.6-alpine
  114. ports:
  115. - "8001:80"
  116. volumes:
  117. - ./:/home/shlink/www
  118. - ./data/infra/mercure_proxy_vhost.conf:/etc/nginx/conf.d/default.conf
  119. links:
  120. - shlink_mercure
  121. shlink_mercure:
  122. container_name: shlink_mercure
  123. image: dunglas/mercure:v0.10
  124. ports:
  125. - "3080:80"
  126. environment:
  127. CORS_ALLOWED_ORIGINS: "*"
  128. JWT_KEY: "mercure_jwt_key"
  129. USE_FORWARDED_HEADERS: "1"