-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (50 loc) · 1.25 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
services:
application:
image: ${APP_NAME}-php
build:
context: ./docker/php/${PHP_VERSION}
container_name: ${APP_NAME}-app
restart: unless-stopped
working_dir: /var/www/
user: ${CURRENT_UID}
volumes:
- ${APP_ROOT_DIR}:/var/www
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
networks:
default: null
nginx:
image: nginx:1.23-alpine
container_name: ${APP_NAME}-nginx
restart: unless-stopped
ports:
- ${APP_PORT}:80
volumes:
- ${APP_ROOT_DIR}:/var/www
- ./docker/nginx:/etc/nginx/conf.d
- ${NGINX_LOG_DIR}:/var/log/nginx
networks:
default: null
database:
image: mysql:8.0-oracle
container_name: ${APP_NAME}-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
SERVICE_NAME: mysql
volumes:
- ./docker/mysql:/docker-entrypoint-initdb.d
networks:
default: null
redis:
container_name: '${APP_NAME}-redis'
image: redis:latest
ports:
- "127.0.0.1:${REDIS_PORT}:6379"
networks:
default: null
networks:
default:
name: ${APP_NAME}-network