-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (67 loc) · 1.49 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
version: '3.9'
services:
api:
container_name: apis
build: .
command: gunicorn app.core.server:app --workers 5 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000
volumes:
- ./server:/url_crawler
ports:
- "8000:8000"
expose:
- "8000"
env_file:
- server/.env
environment:
- HOST=0.0.0.0
- PORT=8000
- DATABASE_HOSTNAME=URL_CRAWLER_DB
- REDIS_HOST=URL_CRAWLER_REDIS
- ENVIRONMENT=development
- DATABASE_USERNAME=postgres
- DATABASE_PASSWORD=postgres
depends_on:
- db
- redis
links:
- 'db:URL_CRAWLER_DB'
- 'redis:URL_CRAWLER_REDIS'
db:
image: postgres:15-alpine
container_name: postgres
restart: always
environment:
POSTGRES_DB: url_crawler
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "8080:5432"
env_file:
- server/.env
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
restart: always
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5050:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- db
links:
- "db:pgsql-server"
redis:
container_name: redis
image: redis:latest
restart: always
# ports:
# - "6379:6379"
volumes:
postgres_data:
pgadmin_data: