-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (45 loc) · 1.15 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
version: '3.7'
services:
web:
build: .
image: todolist-image
depends_on:
- postgres
- redis
environment:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/todolist
REDIS_URL: redis://:redis_default_passwd@redis:6379/0
volumes:
- ./data/logs:/usr/app/server/logs
- ./data/uploads:/usr/app/server/uploads
- ./server/configs:/usr/app/server/configs
- ./server/prisma:/usr/app/server/prisma
ports:
- 8008:8008
restart: on-failure
container_name: todolist-web
postgres:
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: todolist
volumes:
- ./data/pg_data:/var/lib/postgresql/data
- ./server/sql:/docker-entrypoint-initdb.d
ports:
- 5432
restart: always
container_name: pg_db
hostname: postgres
redis:
image: redis:alpine
command: redis-server /etc/redis/redis.conf
ports:
- 6379
restart: always
volumes:
- ./docker/redis.conf:/etc/redis/redis.conf
- ./data/redis_data:/data/redis
container_name: redis_mem
hostname: redis