-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
85 lines (79 loc) · 1.76 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
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
services:
app:
build:
args:
user: ${USER}
uid: 1000
context: ./
dockerfile: Dockerfile
#image: pizza-app
container_name: app-pizza
working_dir: /application
volumes:
- ./:/application
ports:
- 80:80
- ${VITE_PORT}:${VITE_PORT}
networks:
- network-pizza
depends_on:
db:
condition: service_healthy
db:
image: postgres:16.1-alpine3.19
container_name: postgres-pizza
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- network-pizza
healthcheck:
test: [ "CMD-SHELL", "pg_isready --dbname ${DB_DATABASE} --username ${DB_USERNAME}" ]
interval: 3s
timeout: 3s
retries: 5
redis:
image: redis:7.2.3-alpine
container_name: redis-pizza
command: redis-server --appendonly yes --requirepass "${REDIS_PASSWORD}"
networks:
- network-pizza
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
mailpit:
image: axllent/mailpit:v1.20.5
container_name: mailpit-pizza
networks:
- network-pizza
ports:
- ${MAILPIT_PORT}:8025
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin-pizza
ports:
- "8888:80"
networks:
- network-pizza
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
depends_on:
- db
networks:
network-pizza:
driver: bridge
volumes:
db_data:
redis_data: