-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
58 lines (54 loc) · 1.23 KB
/
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
version: '3.9'
services:
frontend:
image: patrikvalentiny/climate-ctrl-frontend:main
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4200:80"
depends_on:
- api
restart: always
api:
depends_on:
- db
- flyway
image: patrikvalentiny/climate-ctrl:latest
build:
context: .
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_ConnectionStrings__Postgres: postgresql://admin:admin@db:5432/climate_ctrl
ports:
- "8080:8080"
env_file:
- .env
db:
image: postgres:latest
container_name: db
ports:
- "5432:5432"
volumes:
- ./db:/var/lib/postgresql/data
environment:
POSTGRES_DB: climate_ctrl
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_SCHEMA: public
POSTGRES_PORT: 5432
restart: always
flyway:
image: flyway/flyway:latest
command: migrate
volumes:
- ./sql:/flyway/sql
environment:
FLYWAY_URL: jdbc:postgresql://db:5432/climate_ctrl
FLYWAY_USER: admin
FLYWAY_PASSWORD: admin
FLYWAY_SCHEMAS: public,climate_ctrl
FLYWAY_CONNECT_RETRIES: 50
depends_on:
- db