-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.server.yml
48 lines (46 loc) · 1.41 KB
/
docker-compose.server.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
# itk-version: 3.2.0
networks:
frontend:
external: true
app:
driver: bridge
internal: false
services:
phpfpm:
image: itkdev/php8.1-fpm:alpine
restart: unless-stopped
networks:
- app
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=128M
- COMPOSER_VERSION=2
volumes:
- .:/app
nginx:
image: nginxinc/nginx-unprivileged:alpine
restart: unless-stopped
networks:
- app
- frontend
depends_on:
- phpfpm
volumes:
- ./.docker/templates:/etc/nginx/templates:ro
- ./.docker/nginx.conf:/etc/nginx/nginx.conf:ro
- .:/app
environment:
NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000
NGINX_WEB_ROOT: /app/public
NGINX_PORT: 8080
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_SERVER_DOMAIN}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure"