forked from Youngestdev/fastapi-mongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
42 lines (38 loc) · 945 Bytes
/
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
version: '3.8'
services:
aerospike:
image: aerospike/aerospike-server
container_name: aerospike
ports:
- "3000:3000" # Default service port
- "3001:3001" # Fabric port (internal cluster communication)
- "3002:3002" # Fabric port (internal cluster communication)
volumes:
- aerospike_data:/opt/aerospike/data
web:
build: ./backend
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
volumes:
- ./backend:/usr/src/app
ports:
- "8005:8000"
env_file:
- .env.dev
depends_on:
- mongodb
- aerospike
environment:
AEROSPIKE_HOST: aerospike
AEROSPIKE_PORT: 3000
mongodb:
image: mongo:latest
environment:
- MONGO_INITDB_ROOT_USERNAME=mongo_user
- MONGO_INITDB_ROOT_PASSWORD=mongo_pass
ports:
- '27017:27017'
volumes:
- data:/data/db
volumes:
data:
aerospike_data: