-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
53 lines (40 loc) · 1.4 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
version: '3.3'
services:
# application API service
api_service:
# a name we want our container to be named.
container_name: api_service
# the API image we created earlier on
image: mukiibi:api_image_final
volumes:
- '/docker-compose-v2'
ports:
# mapping the container port 5000 to the host port locally on my computer 5001
- 5001:5000
environment:
# environment variables for my API application
- APP_SETTING=development
- DATABASE_URL=postgres://postgres:postgres@amity_db:5432/docker
- DEV_SECRET_KEY=thisisit
- JWT_SECRET_KEY=thisisthekey
depends_on:
# this makes this service to wait for the amity_db service to come up first before it runs
- amity_db_service
links:
# this links this service to the amity_db service
- amity_db_service
# apostgresql database server service
amity_db_service:
# container name.
container_name: amity-db
# database image we created earlier on
image: dockercomposev2_amity-db:latest
# mapping the container port 5432 to the host port locally on my computer 5432
# i did this for debugging purposes, so as to access the DB and confirm that indeed
# the database was created and migrations applied.
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- JWT_SECRET_KEY=thisisthekey