-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (43 loc) · 947 Bytes
/
docker-compose.yaml
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
version: '3'
# Run as
# docker-compose build; docker-compose up -d
# Check with
# docker ps
# Then check the logs with
# docker logs --tail 50 $container_id
# docker-compose images
# docker-compose logs --tail 20 repo_name
services:
postgres_db:
image: postgres:11.1
environment: # Set up postgres database name and password
POSTGRES_PASSWORD: password
POSTGRES_DB: trips
POSTGRES_USER: trips
ports: # Set up ports exposed for other containers to connect to
- 5432:5432
networks:
- app-tier
volumes:
- ./postgres:/docker-entrypoint-initdb.d
python_app:
build:
context: .
dockerfile: Dockerfile
depends_on:
- postgres_db
networks:
- app-tier
volumes:
- ./data:/app/data
command:
tail -f /dev/null
redis:
image: redis
ports:
- 6379:6379
networks:
- app-tier
networks:
app-tier:
driver: bridge