-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
72 lines (66 loc) · 1.79 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
70
71
72
# Example Prod Environment Setup
name: ls_prod
services:
# Laravel App
ls_prod_app:
build:
context: .
dockerfile: ./.docker/prod/Dockerfile
container_name: ls_prod_app
stdin_open: true
tty: true
restart: always
ports:
- ${APP_PORT}:8080
volumes:
- ./:/var/www/html
environment:
RUN_LARAVEL_AUTOMATIONS: 'false'
AUTORUN_ENABLED: 'true'
AUTORUN_LARAVEL_STORAGE_LINK: 'false'
AUTORUN_LARAVEL_MIGRATION: 'true'
SSL_MODE: 'mixed'
PHP_POOL_NAME: 'app_pool'
PHP_OPCACHE_ENABLE: '1'
networks:
- ls_prod_app_net
- ls_prod_redis_net
command: ['php', '/var/www/html/artisan', 'schedule:work']
# Database
ls_prod_db:
image: mysql:latest
container_name: ls_prod_db
restart: unless-stopped
ports:
- ${DB_PORT}:3306
environment:
MYSQL_DATABASE: ${DB_DATABASE}
ON_CREATE_DB: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- ls_prod_app_net
# Redis
ls_prod_redis:
image: redis:alpine
container_name: ls_prod_redis
hostname: ls_prod_app
restart: always
ports:
- ${REDIS_PORT}:6379
networks:
- ls_prod_redis_net
networks:
ls_prod_app_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.10.0.0/16
ls_prod_redis_net:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.40.0.0/16