-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1.6 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
# 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: start web
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: ./divio/.env-local
links:
- "db:postgres"
depends_on:
- db
entrypoint: ""
# On the Cloud, your database runs on a dedicated cluster. Locally, we
# replicate it in a Docker container called "db".
db:
image: postgres:9.6-alpine
environment:
POSTGRES_DB: "db"
volumes:
- ".:/app:rw"