-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
108 lines (99 loc) · 2.42 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3.7"
services:
# -----PokeAPI-----
# Starts the PostgreSQL DataBase
pokedb:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=pokeapi
ports:
- "5432:5432"
# Starts the PokeAPI
pokeapi:
build: pokeapi/
restart: always
command: bash -c "python3 app.py"
volumes:
- ./pokeapi:/code
depends_on:
- pokedb
environment:
- api_prefix=/api/v1/pokeapi
- database_url=postgres://postgres:postgres@pokedb/pokeapi
- port=8000
- secret_key=SuperSecretKey # this can be replace using a .env
# -----UsersAPI-----
# Starts the PostgreSQL DataBase
usersdb:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=usersapi
ports:
- "5433:5433"
# Starts the UsersAPI
usersapi:
build: usersapi/
restart: always
command: bash -c "python3 app.py"
volumes:
- ./usersapi:/code
depends_on:
- usersdb
environment:
- api_prefix=/api/v1/users
- database_url=postgres://postgres:postgres@usersdb/usersapi
- port=8000
- secret_key=SuperSecretKey # this can be replace using a .env
# -----DigiAPI-----
# Starts the PostgreSQL DataBase
digidb:
image: postgres:12
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=digiapi
ports:
- "5434:5434"
# Starts the DigiAPI
digiapi:
build: digiapi/
restart: always
# TODO: this should just call the compiled main
command: bash -c "go run main.go"
volumes:
- ./digiapi:/code
depends_on:
- digidb
environment:
- api_prefix=/api/v1/digiapi
- database_url=host=digidb user=postgres password=postgres dbname=digiapi
- port=8000
- secret_key=SuperSecretKey # this can be replace using a .env
# -----PGAdmin-----
pgadmin:
image: dpage/pgadmin4
depends_on:
- pokedb
- usersdb
environment:
- PGADMIN_DEFAULT_PASSWORD=pokemon
ports:
- "5050:80"
# -----Nginx-----
nginx:
image: nginx:latest
ports:
- "8080:8080"
volumes:
- ./nginx_config.conf:/etc/nginx/conf.d/default.conf
depends_on:
- pokeapi
- usersapi