-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.01 KB
/
docker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.01 KB
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
version: '3.8'
services:
db:
container_name: postgres
image: postgres
command: -p ${POSTGRES_DB_PORT}
expose:
- ${POSTGRES_DB_PORT}
restart: 'always'
environment:
- POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB_USER}
- POSTGRES_USER=${POSTGRES_DB_USER}
volumes:
- ./postgres:/var/lib/postgresql/data
redis:
container_name: redis
image: 'redis:latest'
restart: 'always'
environment:
- REDIS_HOST=redis
- REDIS_PORT=${PORT_REDIS}
ports:
- '${PORT_REDIS}:6379'
volumes:
- '$PWD/redis.conf:/usr/local/etc/redis/redis.conf'
command:
- 'redis-server'
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
api:
container_name: fast_api
build:
dockerfile: Dockerfile
restart: 'always'
env_file:
- .env
environment:
- API_REDIS_HOST=redis
ports:
- '${FAST_API_PORT}:8000'
depends_on:
- db
- redis
entrypoint: ./start.sh