| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- version: '3.4'
- services:
- acta:
- image: lucasdiedrich/ojs:php7-test
- # ports:
- # - "4437:443"
- # restart: always
- environment:
- # - SERVERNAME="www.maastikuarhitektuur.ee"
- # - HTTPS="on"
- - OJS_DB_DRIVER=mysqli
- - OJS_CLI_INSTALL=0
- - OJS_DB_HOST=node # Database host
- - OJS_DB_USER=ojs_acta # Database username
- - OJS_DB_PASSWORD=R36aVTUKgOWgawMRvSVqZ4LfYWswZc # Database password
- - OJS_DB_NAME=ojs_acta # Database name
- volumes:
- # Create files or folders first and check permisions, to avoid errors:
- - private:/var/www/files
- - public:/var/www/html/public
- - logs:/var/log/apache2
- - backup:/srv/backups
- - data:/var/www/html
- - /etc/localtime:/etc/localtime
- networks:
- - db-network
- - traefik-network
- # - traefik-external
- depends_on:
- - node
- deploy:
- mode: replicated
- replicas: 1
- placement:
- constraints:
- - node.role == manager
- - node.hostname == hetzner
- labels:
- - "traefik.enable=true"
- - traefik.docker.network=traefik-network
- - traefik.constraint-label=traefik-network
- ## www.maastikuarhitektuur.ee
- ## http
- - traefik.http.routers.ojs-maastikuarhitektuur-http.rule=Host(`www.maastikuarhitektuur.ee`) || Host(`maastikuarhitektuur.ee`)
- - traefik.http.routers.ojs-maastikuarhitektuur-http.entrypoints=web
- ## http redirect to www
- - "traefik.http.routers.ojs-maastikuarhitektuur-http.middlewares=web-to-www-redirect"
- - "traefik.http.middlewares.web-to-www-redirect.redirectregex.regex=^http://(?:www.)?maastikuarhitektuur.ee/(.*)"
- - "traefik.http.middlewares.web-to-www-redirect.redirectregex.replacement=http://www.maastikuarhitektuur.ee/$${1}"
- ## http to https
- - traefik.http.routers.ojs-maastikuarhitektuur-http.middlewares=http-to-https
- ## https
- - traefik.http.routers.ojs-maastikuarhitektuur-https.rule=Host(`www.maastikuarhitektuur.ee`) || Host(`maastikuarhitektuur.ee`)
- - traefik.http.routers.ojs-maastikuarhitektuur-https.entrypoints=websecure
- - "traefik.http.routers.ojs-maastikuarhitektuur-https.tls.certresolver=mychallenge"
- ## https redirect to www
- - "traefik.http.routers.ojs-maastikuarhitektuur-https.middlewares=websecure-to-www-redirect"
- - "traefik.http.middlewares.websecure-to-www-redirect.redirectregex.regex=^https://(?:www.)?maastikuarhitektuur.ee/(.*)"
- - "traefik.http.middlewares.websecure-to-www-redirect.redirectregex.replacement=https://www.maastikuarhitektuur.ee/$${1}"
- ## service point
- - traefik.http.services.ojs-maastikuarhitektuur.loadbalancer.server.port=80
- - "traefik.http.routers.ojs-maastikuarhitektuur-http.service=ojs-maastikuarhitektuur"
- - "traefik.http.routers.ojs-maastikuarhitektuur-https.service=ojs-maastikuarhitektuur"
- configs:
- - source: supervisord_conf
- target: /etc/supervisord.conf
- # uid: '0'
- # gid: '0'
- # mode: 0440
- - source: config_inc_php
- target: /var/www/html/config.inc.php
- uid: '100'
- gid: '101'
- mode: 0440
- - source: custom_ini
- target: /usr/local/etc/php/conf.d/custom.ini
- - source: htaccess
- target: /var/www/html/.htaccess
- uid: '100'
- gid: '101'
- mode: 0644
- - source: ojs_conf
- target: /etc/apache2/conf.d/ojs.conf
- configs:
- supervisord_conf:
- file: ./config/supervisord.conf
- config_inc_php:
- file: ./config/ojs.config.inc
- custom_ini:
- file: ./config/php.custom.ini
- htaccess:
- file: ./config/htaccess
- ojs_conf:
- file: ./config/ojs.conf
- volumes:
- backup:
- # name: ojs_backup
- # driver: local
- logs:
- # name: ojs_logs
- # driver: local
- private:
- # name: ojs_private
- # driver: local
- public:
- # name: ojs_public
- # driver: local
- data:
- # name: ojs_data
- # driver: local
- networks:
- db-network:
- external: true
- traefik-network:
- external: true
- # traefik-external:
- # external:
- # name: traefik-external
|