-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.17 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
services:
app:
image: app
restart: on-failure
build:
context: ./app
dockerfile: Dockerfile
command: npm start
container_name: app
depends_on:
database:
condition: service_healthy
env_file:
- .env
volumes:
- ./public:/app/public
networks:
- app
database:
image: postgres:16.3-alpine3.20
restart: on-failure
container_name: database
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
networks:
- app
nginx:
image: nginx:1.23.3-alpine-slim
restart: on-failure
container_name: nginx
depends_on:
- app
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./public:/public
ports:
- '80:80'
networks:
- app
mailhog:
image: mailhog/mailhog:v1.0.1
restart: on-failure
container_name: mailhog
ports:
- '8025:8025'
logging:
driver: none
networks:
- app
networks:
app:
driver: bridge