-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
95 lines (90 loc) · 2.52 KB
/
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
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
version: '3.8'
services:
social_db:
image: postgres:14.1-alpine
container_name: social_db
command: postgres -c "max_connections=300"
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- social_db:/var/lib/postgresql/data
social_backend:
build:
context: backend/
dockerfile: ./backend.Dockerfile
container_name: social_backend
restart: always
command: python -m uvicorn core.asgi:application --host 0.0.0.0 --reload
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
- AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- GOOGLE_SEARCH_ENGINE_ID=${GOOGLE_SEARCH_ENGINE_ID}
depends_on:
- social_db
ports:
- "8000:8000"
volumes:
- type: bind
source: ./logs/
target: /app/logs/
- ./:/app/:cached
social_redis:
image: redis:5.0-alpine
container_name: social_redis
volumes:
- redisdata:/data
social_celery:
container_name: social_celery
restart: unless-stopped
build:
context: backend/
dockerfile: ./backend.Dockerfile
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
- AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- GOOGLE_SEARCH_ENGINE_ID=${GOOGLE_SEARCH_ENGINE_ID}
depends_on:
- social_db
- social_redis
social_frontend:
build:
context: frontend/
dockerfile: ./frontend.Dockerfile
container_name: social_frontend
restart: always
#depends_on:
# - social_backend
ports:
- "3000:3000"
volumes:
- ./:/app/:cached
volumes:
social_db:
driver: local
rabbitmq_data:
driver: local
rabbitmq_log:
driver: local
redisdata:
driver: local