-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1010 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
46
47
48
49
50
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile-test
ports:
- "3000:3000"
environment:
- REACT_APP_API_URL=http://localhost:8080
depends_on:
- app
networks:
- lolcounter-network
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- DATABASE_URL=postgres://user:password@db:5432/lolcounter?sslmode=disable
depends_on:
db:
condition: service_healthy
networks:
- lolcounter-network
db:
image: postgres:alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=lolcounter
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d lolcounter"]
interval: 5s
timeout: 5s
retries: 5
networks:
- lolcounter-network
networks:
lolcounter-network:
driver: bridge
volumes:
postgres_data: