-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (45 loc) · 1.01 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
services:
phoenix:
build:
context: .
environment:
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: book_my_gigs_dev
PGPORT: 5432
PGHOST: db
ports:
- '4000:4000'
depends_on:
- db
networks:
- backend
volumes:
- phoenix_deps:/book_my_gigs/deps
- phoenix_build:/book_my_gigs/_build
- ./:/book_my_gigs
expose:
- 4000
db:
image: postgres:latest
hostname: db # facultatif car par défaut il prend le nom du service
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: book_my_gigs_dev
restart: always
# name:/docker_path (but this time docker containes the data file)
# ./local_path:/docker_path
volumes:
- ./data:/var/lib/postrgresql/data
networks:
- backend
ports:
- '5432:5432'
# Allows containers to communicate over the same network
networks:
backend:
driver: bridge
volumes:
phoenix_deps:
phoenix_build: