Skip to content

Commit 6c9842b

Browse files
committed
Docker container's implemented
- created docker-compose.yaml; - created docker-compose.yaml.example; - changed .gitignore for include local docker-compose.yaml.
1 parent 0bfbc3f commit 6c9842b

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ storage/*.key
1111
.env
1212
Homestead.yaml
1313
Homestead.json
14+
docker-compose.yaml

docker-compose.yaml.example

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
##############################################################
2+
# ATENTION:
3+
# Replace all occurences of sandbox with your project's name
4+
##############################################################
5+
6+
version: '2.1'
7+
8+
volumes:
9+
sandbox-config:
10+
driver: local
11+
12+
sandbox-cache:
13+
driver: local
14+
15+
sandbox-local:
16+
driver: local
17+
18+
sandbox-yarn:
19+
driver: local
20+
21+
sandbox-npm:
22+
driver: local
23+
24+
sandbox-mysql-data:
25+
driver: local
26+
27+
sandbox-redis-data:
28+
driver: local
29+
30+
services:
31+
mysql:
32+
image: ambientum/mysql:5.7
33+
container_name: sandbox-mysql
34+
networks:
35+
sandbox_net:
36+
ipv4_address: 192.168.0.2
37+
volumes:
38+
- sandbox-mysql-data:/var/lib/mysql
39+
ports:
40+
- "3306:3306"
41+
environment:
42+
- MYSQL_ROOT_PASSWORD=sandbox
43+
- MYSQL_DATABASE=sandbox
44+
- MYSQL_USER=sandbox
45+
- MYSQL_PASSWORD=sandbox
46+
47+
cache:
48+
image: ambientum/redis:3.2
49+
container_name: sandbox-redis
50+
networks:
51+
sandbox_net:
52+
ipv4_address: 192.168.0.3
53+
command: --appendonly yes
54+
volumes:
55+
- sandbox-redis-data:/data
56+
ports:
57+
- "6379:6379"
58+
59+
app:
60+
image: ambientum/php:latest-nginx
61+
container_name: sandbox-app
62+
networks:
63+
sandbox_net:
64+
ipv4_address: 192.168.0.4
65+
volumes:
66+
- .:/var/www/app
67+
ports:
68+
- "80:8080"
69+
links:
70+
- mysql
71+
- cache
72+
73+
queue:
74+
image: ambientum/php:7.0
75+
container_name: sandbox-queue
76+
networks:
77+
sandbox_net:
78+
ipv4_address: 192.168.0.5
79+
command: php artisan queue:listen
80+
volumes:
81+
- .:/var/www/app
82+
links:
83+
- mysql
84+
- cache
85+
86+
dev:
87+
image: ambientum/node:7
88+
container_name: sandbox-dev
89+
networks:
90+
sandbox_net:
91+
ipv4_address: 192.168.0.6
92+
volumes:
93+
- .:/var/www/app
94+
- sandbox-config:/home/ambientum/.config
95+
- sandbox-cache:/home/ambientum/.cache
96+
- sandbox-local:/home/ambientum/.local
97+
- sandbox-yarn:/home/ambientum/.yarn
98+
- sandbox-npm:/home/ambientum/.npm
99+
100+
networks:
101+
sandbox_net:
102+
driver: bridge
103+
enable_ipv6: true
104+
ipam:
105+
driver: default
106+
config:
107+
- subnet: 192.168.0.0/24
108+
gateway: 192.168.0.1

0 commit comments

Comments
 (0)