-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
69 lines (63 loc) · 1.7 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
version: '3'
services:
php-fpm:
build:
context: .
dockerfile: docker/php-fpm-alpine-phalcon/Dockerfile
args:
PHP_VERSION: "8.3-fpm-alpine"
PHALCON_VERSION: "5.8.0"
entrypoint: ["sh", "/usr/local/bin/entrypoint.sh", "php-fpm"]
volumes:
- ./docker/entrypoint.sh:/usr/local/bin/entrypoint.sh
- ./:/var/www/html
depends_on:
- db
- redis
networks:
- zemit-network
apache:
image: httpd:alpine
volumes:
- ./:/var/www/html
- ../admin/dist/:/var/www/html/public/admin/
- ./docker/apache/conf/zemit-httpd.conf:/usr/local/apache2/conf/zemit-httpd.conf
command: >
/bin/sh -c "
apk update &&
apk add --no-cache openssl &&
openssl req -x509 -nodes -days 365 -newkey rsa:2048
-keyout /usr/local/apache2/conf/server.key -out /usr/local/apache2/conf/server.crt
-subj '/C=US/ST=State/L=City/O=Organization/CN=localhost' &&
echo 'Include /usr/local/apache2/conf/zemit-httpd.conf' >> /usr/local/apache2/conf/httpd.conf &&
httpd-foreground"
ports:
- "80:80"
- "443:443"
depends_on:
# - ssl-generator
- php-fpm
networks:
- zemit-network
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
MYSQL_DATABASE: ${DATABASE_DBNAME}
MYSQL_USER: ${DATABASE_USERNAME}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
volumes:
- dbdata:/var/lib/mysql
- ./docker/mysql/init-scripts:/docker-entrypoint-initdb.d
networks:
- zemit-network
redis:
image: redis:alpine
networks:
- zemit-network
networks:
zemit-network:
driver: bridge
volumes:
dbdata:
ssl_certs: