forked from marcbria/docker-pkp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.traefik.yml
77 lines (67 loc) · 2.34 KB
/
docker-compose.traefik.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File: docker-compose.yml
# Author: Marc Bria UAB (marc.bria@uab.es)
version: "3.7"
services:
db:
image: mariadb:10.2
env_file:
- .env
container_name: "pkp_db_${COMPOSE_PROJECT_NAME:-demo}"
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:-pkpPwd}"
MYSQL_DATABASE: "${MYSQL_DATABASE:-pkp}"
MYSQL_USER: "${MYSQL_USER:-pkp}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD:-pkpPwd}"
# volumes:
# - ./volumes/db:/var/lib/mysql
# - ./volumes/logs/db:/var/log/mysql
# - ./volumes/config/db.charset.conf:/etc/mysql/conf.d/charset.cnf
# - ./volumes/migration:/docker-entrypoint-initdb.d
networks:
- inside
restart: unless-stopped
app:
image: local/${PKP_TOOL}:3_3_0-11
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
container_name: "pkp_app_${COMPOSE_PROJECT_NAME:-demo}"
hostname: "${COMPOSE_PROJECT_NAME:-demo}"
ports:
- "${HTTP_PORT:-8081}:80"
- "${HTTPS_PORT:-443}:443"
volumes:
- /etc/localtime:/etc/localtime
# - ./volumes/private:/var/www/files
# - ./volumes/public:/var/www/html/public
# - ./volumes/logs/app:/var/log/apache2
# # WARNING: You can only enable file-volumes if file exists in the container.
# - ./volumes/config/ojs.config.inc.php:/var/www/html/config.inc.php
- ./volumes/config/apache.htaccess:/var/www/html/.htaccess
# - ./volumes/php.custom.ini:/usr/local/etc/php/conf.d/custom.ini
labels:
# Enable traefik:
- "traefik.enable=true"
# Run under HTTPS only:
- "traefik.http.routers.omp-test03.entrypoints=websecure"
- "traefik.http.routers.omp-test03.rule=Host(`test03.precarietat.net`)"
- "traefik.http.routers.omp-test03.tls=true"
- "traefik.http.routers.omp-test03.tls.certresolver=leresolver"
# Redirect HTTP to HTTPS:
# - "traefik.http.middlewares.redirect-websecure.redirectscheme.scheme=https"
# - "traefik.http.routers.omp-test01.middlewares=redirect-websecure"
# Folder under revistas.uab.* domain
# - "traefik.http.routers.omp-formacioomp-app.rule=Host(`revistes.uab.cat`,`revistes.uab.es`) && PathPrefix(`/formacioomp`)"
networks:
- inside
- proxy
depends_on:
- db
restart: unless-stopped
networks:
inside:
external: false
proxy:
external: true