This repository was archived by the owner on Apr 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (57 loc) · 1.67 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
version: '3'
services:
app:
build:
context: .
dockerfile: ./Dockerfile
depends_on:
- db
environment:
# Change "dev" to "prod" in production
- APP_ENV=dev
- APP_DEBUG=true
- GH_TOKEN=putAValidGithubToken
- GH_SECURED_TOKEN=putAValidSecuredToken
volumes:
# Comment out the next line in production
- ./:/srv/community-platform:rw
# This is for assets:install
- ./web:/srv/community-platform/web:rw
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
- /srv/community-platform/var
- /srv/community-platform/var/cache
- /srv/community-platform/var/logs
- /srv/community-platform/var/sessions
- /srv/community-platform/vendor
networks:
- community-platform
db:
build:
context: ./docker/db
dockerfile: ./Dockerfile
environment:
- MYSQL_DATABASE=community_platform
# You should definitely change the password in production
- MYSQL_PASSWORD=community_platform
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_USER=community_platform
volumes:
- db-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/db/data:/var/lib/mysql:rw
nginx:
image: nginx:1.11-alpine
depends_on:
- app
ports:
- '81:80'
volumes:
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ./web:/srv/community-platform/web:ro
networks:
- community-platform
volumes:
app-web: {}
db-data: {}
networks:
community-platform: ~