-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 1.29 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
version: '3.9'
services:
node:
build: ./httpd
ports:
- "443:443"
volumes:
# Location of {vhost}.conf files, that are usually located at `/etc/apache2/sites-enabled` on an Ubuntu Server
- ./enabled:/usr/local/apache2/conf/sites_enabled
# Certificate location.
# - Create a folder named `certs` for public certificate storage
# - Create a folder named `private` for private certificate storage
- ./ssl:/apache-ssl
- ./logs:/apache-logs
- /docker:/docker:ro
volumes_from:
- fpm
depends_on:
- fpm
extra_hosts:
# This helps access other local-only docker stacks' shared ports
- "host.docker.internal:host-gateway"
# Latest PHP
fpm:
image: php:fpm-alpine
expose:
- 9000
volumes:
# Share same website locations to be able to render PHP files correctly. These two paths are mandatory
- ./sites:/apache-sites
# ^ This one is used for vhost's DocumentRoot
- ./errorpages:/apache-errors
# ^ This one is used for error handling. There's a GET parameter 's', that represents the current status code (eg.: 403 or 404)
# Redirect http requests to https
redirect:
build: ./http-redirect
ports:
- "80:80"
networks:
default:
driver: bridge
name: webserver