-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (41 loc) · 985 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
43
44
45
version: '3.8'
services:
db:
image: postgres:latest
container_name: my-postgres
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
pgadmin:
image: dpage/pgadmin4:latest
container_name: my-pgadmin
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- '5050:80'
depends_on:
- db
volumes:
- pgadmin-data:/var/lib/pgadmin
cache:
image: redis:6.2-alpine
restart: always
ports:
- '6379:6379'
command: redis-server --loglevel warning
volumes:
- cache:/data
# Volumes store your database data and pgAdmin data.
volumes:
pgdata:
pgadmin-data:
cache: