-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml.dist
144 lines (135 loc) · 4.86 KB
/
docker-compose.yml.dist
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
# See: https://docs.docker.com/compose/compose-file/
networks:
lamp-network:
name: lamp-network
ipam:
driver: default
config:
- subnet: "172.18.0.0/24"
services:
web:
image: nginx:stable-alpine
container_name: lamp_web
ports:
- 80:80
- 443:443
volumes:
- ~/Development:/app
- ./nginx/ssl/:/etc/nginx/ssl
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/fastcgi_params:/etc/nginx/fastcgi_params
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/snippets:/etc/nginx/snippets
- ./nginx/rewrites:/etc/nginx/rewrites
networks:
# to set specific subnet fixed ip,
# useful if you need to map a hostname to this container
lamp-network:
ipv4_address: 172.18.0.1
# else
# - lamp-network
depends_on:
- php
php:
image: soifou/php-alpine:fpm-8.3
container_name: lamp_php
volumes:
- ~/Development:/app
# to override some php settings, uncomment below
# - ./php/php.ini:/etc/php8/conf.d/50_setting.ini
ports:
- 9000:9000
# if php container need to be aware of api.test running on container web
# you can set an extra hosts in /etc/hosts like below:
# extra_hosts:
# - api.test:172.18.0.6
networks:
lamp-network:
ipv4_address: 172.18.0.2
mysql:
image: wodby/mariadb:10.11
container_name: lamp_db
# to persist databases, uncomment below
# volumes:
# for macOS
# - /var/lib/boot2docker/mariadb:/var/lib/mysql
# for linux
# - /local/path/mysql:/var/lib/mysql
# on laptop, if you notice some performance issue on database operations
# and your databases are stored on a ext [3/4] filesystem,
# see if disabling barrier (man mount) in /etc/fstab helps
# For more information, read: https://lwn.net/Articles/283161/
environment:
MYSQL_ROOT_PASSWORD: root
networks:
lamp-network:
ipv4_address: 172.18.0.3
postgres:
# image: postgres:alpine
image: postgis/postgis:15-3.3-alpine # postgres with postgis extension
container_name: lamp_postgres
restart: unless-stopped
environment:
# POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
# POSTGRES_HOST_AUTH_METHOD: trust
# volumes:
# - /custom/mount:/var/lib/postgresql/data
# - db-data:/var/lib/postgresql/data
networks:
lamp-network:
ipv4_address: 172.18.0.4
maildev:
image: maildev/maildev
container_name: lamp_mail
ports:
- 1080:80
networks:
lamp-network:
ipv4_address: 172.18.0.5
redis:
image: redis:alpine
container_name: lamp_redis
networks:
lamp-network:
ipv4_address: 172.18.0.6
mongodb:
image: mvertes/alpine-mongo
container_name: lamp_mongodb
# override default start command, disabling journal here
# https://github.com/mvertes/docker-alpine-mongo/blob/e7c9db6391c5495bc6221c60d7e577178cb3d0d3/Dockerfile#L10
command: ["mongod", "--bind_ip", "0.0.0.0", "--nojournal"]
# volumes:
# - /local/path/mongodb:/data/db
ports:
- 27017:27017
# - 28017:28017
networks:
lamp-network:
ipv4_address: 172.18.0.7
mercure:
image: dunglas/mercure
container_name: lamp_mercure
ports:
- 8000:80
# Use a less common port this avoid to clash with nodejs apps
# that usually serve on port 3000
- 3009:3000
command: /usr/bin/caddy run --config /etc/caddy/dev.Caddyfile
environment:
# Uncomment the following line to disable HTTPS
SERVER_NAME: ':80'
# Keys generated using: openssl rand -base64 32
# to avoid getting "Key provided is shorter than 256 bits, only 80 bits provided"
# when using hmac.256 symmetric algorith
MERCURE_PUBLISHER_JWT_KEY: 'Tx1xmzYVO3+VTiiTTyyPUsodZSWeltVyRNQAQ4pyA4M='
MERCURE_SUBSCRIBER_JWT_KEY: 'qhj3JbCrs37PLdcPtNyRVAxNvoS38zQh2Oot2fT3cKE='
# Mercure is on another domain (http://mercure/.well-known/mercure)
# we need to explicitly set domains that listen it (separate by space)
MERCURE_EXTRA_DIRECTIVES: |
ui 1
cors_origins http://website.test
networks:
lamp-network:
ipv4_address: 172.18.0.8