forked from open-marketplace/open-marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (103 loc) · 3.28 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
services:
php:
container_name: php
build:
context: .
target: open_marketplace_php_dev
depends_on:
- migrations
environment:
- APP_ENV=dev
- APP_DEBUG=1
- APP_SECRET=EDITME
- DATABASE_URL=mysql://open_marketplace:${MYSQL_PASSWORD:-nopassword}@mysql/open_marketplace
- MAILER_URL=smtp://mailhog:1025
- PHP_DATE_TIMEZONE=${PHP_DATE_TIMEZONE:-UTC}
volumes:
- .:/srv/open_marketplace:rw,cached
# if you develop on Linux, you may use a bind-mounted host directory instead
- ./var:/srv/open_marketplace/var:rw
# - ./public:/srv/open_marketplace/public:rw,delegated
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./public/media:/srv/open_marketplace/public/media:rw
- public-media:/srv/open_marketplace/public/media:rw
- fixture-images:/srv/open_marketplace/var/fixtures
migrations:
container_name: migrations
build:
context: .
target: open_marketplace_migrations_dev
depends_on:
- mysql
environment:
- APP_ENV=dev
- APP_DEBUG=1
- APP_SECRET=EDITME
- DATABASE_URL=mysql://open_marketplace:${MYSQL_PASSWORD:-nopassword}@mysql/open_marketplace
- LOAD_FIXTURES=1
- PHP_DATE_TIMEZONE=${PHP_DATE_TIMEZONE:-UTC}
volumes:
- public-media:/srv/open_marketplace/public/media:rw
- fixture-images:/srv/open_marketplace/var/fixtures
mysql:
container_name: mysql
image: mysql:5.7 # Sylius is fully working on mysql 8.0 version
platform: linux/amd64
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-nopassword}
- MYSQL_DATABASE=open_marketplace
- MYSQL_USER=open_marketplace
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-nopassword}
volumes:
- mysql-data:/var/lib/mysql:rw
# you may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/mysql/data:/var/lib/mysql:rw,delegated
ports:
- "${MYSQL_PORT:-3306}:3306"
cap_add:
- SYS_NICE # prevent "mbind: Operation not permitted" errors
node:
container_name: node
build:
context: .
target: open_marketplace_node
command: ["yarn", "watch"]
depends_on:
- php
environment:
- GULP_ENV=dev
- PHP_HOST=php
- PHP_PORT=9000
volumes:
- .:/srv/open_marketplace:rw,cached
- ./public:/srv/open_marketplace/public:rw,delegated
ports:
- "${NODE_PORT:-35729}:35729"
nginx:
container_name: nginx
build:
context: .
target: open_marketplace_nginx
depends_on:
- php
- node # to ensure correct build order
volumes:
- ./public:/srv/open_marketplace/public:ro
# if you develop on Linux, you may use a bind-mounted host directory instead
# - ./public/media:/srv/open_marketplace/public/media:ro
- public-media:/srv/open_marketplace/public/media:ro,nocopy
ports:
- "${HTTP_PORT:-80}:80"
mailhog:
# do not use in production!
image: mailhog/mailhog:latest
environment:
- MH_STORAGE=maildir
# volumes:
# - ./docker/mailhog/maildir:/maildir:rw,delegated
ports:
- "${MAILHOG_PORT:-8025}:8025"
volumes:
mysql-data:
public-media:
fixture-images: