forked from goryn-clade/pathfinder-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
109 lines (107 loc) · 3.35 KB
/
docker-compose.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: "3.8"
services:
pfdb:
image: bianjp/mariadb-alpine:latest
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_PASSWORD
container_name: "$CONTAINER_NAME-db"
networks:
pf:
aliases:
- "${CONTAINER_NAME}db"
volumes:
- db_data:/var/lib/mysql
- $path/pathfinder/export/sql/eve_universe.sql.zip:/eve_universe.sql.zip
restart: always
pf-redis:
image: redis:6.2.5-alpine3.14
container_name: "$CONTAINER_NAME-redis"
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- redis_data:/data
networks:
pf:
aliases:
- "$CONTAINER_NAME-redis"
logging:
driver: none
restart: always
pf-socket:
image: composer:composer@sha256:d374b2e1f715621e9d9929575d6b35b11cf4a6dc237d4a08f2e6d1611f534675
container_name: "$CONTAINER_NAME-socket"
command: ["sh","-c","composer install && php cmd.php --tcpHost 0.0.0.0"]
hostname: socket
volumes:
- ${path}/websocket:/app
networks:
pf:
aliases:
- "$CONTAINER_NAME-socket"
restart: always
pf:
container_name: ${CONTAINER_NAME}
hostname: "pathfinder"
build: '.'
env_file:
- .env
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.services.pf.loadbalancer.server.port=80"
- "traefik.http.routers.pf.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.pf.entrypoints=web"
- "traefik.http.routers.pf-secure.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.pf-secure.entrypoints=websecure"
- "traefik.http.routers.pf-secure.tls=true"
- "traefik.http.routers.pf-secure.tls.certresolver=letsencrypt"
- "traefik.http.middlewares.redirecthttps.redirectscheme.scheme=https"
- "traefik.http.routers.pf.middlewares=redirecthttps"
networks:
- pf
- web
healthcheck:
disable: true
volumes:
- ${path}/config/pathfinder/config.ini:/var/www/html/pathfinder/app/templateConfig.ini
- ${path}/config/pathfinder/pathfinder.ini:/var/www/html/pathfinder/app/pathfinder.ini
- ${path}/config/pathfinder/plugin.ini:/var/www/html/pathfinder/app/plugin.ini
depends_on:
- pfdb
- pf-redis
- pf-socket
restart: always
traefik:
image: "traefik:v2.3"
container_name: "traefik"
command:
- "--log.level=ERROR"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
# Remove below line when ready for production
- "--certificatesresolvers.letsencrypt.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.letsencrypt.acme.email=MYEMAIL@someemailprobablygmail.com"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "${path}/letsencrypt:/letsencrypt"
networks:
- web
restart: always
volumes:
data:
db_data:
redis_data:
networks:
pf:
web:
external: true