-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
48 lines (46 loc) · 1.81 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
# This docker-compose.yml file is used to set up your project in the local
# development environment *only*. It is *not* used in deployment to our cloud
# servers, and has no effect whatsoever in cloud deployments.
#
# See our Developer Handbook for more information:
# http://docs.divio.com/en/latest/reference/docker-docker-compose.html
version: "3.2"
services:
# The web container is an instance of exactly the same Docker image as your
# Cloud application container.
web:
build: .
# Change the port if you'd like to expose your project locally on a
# different port, for example if you already use port 8000 for
# something else.
ports:
- "8000:80"
volumes:
# - ".:/app:rw"
- "./data:/data:rw"
# The default command that the container starts with. If you'd like to run
# the project locally in Live configuration, you will need to change this.
# See https://docs.divio.com/en/latest/how-to/local-in-live-mode.html.
command: bash -c "chmod a+x /app/divio/run-locally.sh && php /app/divio/run-env.php /app/divio/run-locally.sh"
# Add any environment variables your project needs to the .env-local file.
# See https://docs.divio.com/en/latest/reference/configuration-environment-variables.html.
env_file: .env-local
links:
- "database_default"
entrypoint: ""
# On the Cloud, your database runs on a dedicated cluster. Locally, we
# replicate it in a Docker container.
database_default:
image: mysql:5.6
environment:
MYSQL_DATABASE: "db"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
SERVICE_MANAGER: "fsm-mysql"
volumes:
- ".:/app:rw"
- "./data/db:/var/lib/mysql"
healthcheck:
test: "/usr/bin/mysql --user=root -h 127.0.0.1 --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 10