-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
51 lines (51 loc) · 1.33 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
version: '3'
services:
web:
container_name: sdlt_web
image: nginx:alpine
volumes:
- "./docker/nginx.conf:/etc/nginx/conf.d/default.conf"
- "./:/var/www/html"
ports:
- "8123:80"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "nginx -g 'daemon off;'"
restart: always
depends_on:
- php
- mysqldb
networks:
- frontend
- backend
php:
container_name: sdlt_php
image: php:${PHP_VERSION}-fpm
restart: always
volumes:
- "./:/var/www/html"
- "./docker/setup_php.sh:/opt/setup.sh"
- ./logs/:/var/log
networks:
- backend
command: /bin/sh -c /opt/setup.sh
mysqldb:
image: mysql:${MYSQL_VERSION}
container_name: sdlt_mysql
restart: always
env_file:
- ".env"
environment:
- MYSQL_DATABASE=${SS_DATABASE_NAME}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${SS_DATABASE_USERNAME}
- MYSQL_PASSWORD=${SS_DATABASE_PASSWORD}
volumes:
- "./data/db/mysql:/var/lib/mysql"
networks:
- backend
networks:
frontend:
backend:
volumes:
data: