-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.02 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
version: '3.1'
services:
redis:
image: redis:7.0.7
expose:
- 6379
postgres:
image: postgres:15.1-alpine
restart: always
expose:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=some_secret
volumes:
- ./dbinit.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
retries: 10
web:
image: nginx:1.23.3-alpine
depends_on:
- app
volumes:
- ./nginx.conf:/etc/nginx/templates/default.conf.template
ports:
- 3000:3000
app:
build:
context: ./
dockerfile: ./Dockerfile
container_name: app
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=some_secret
- POSTGRES_DB=postgres
- REDIS_HOST=redis
- REDIS_PORT=6379
expose:
- 1234
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started