-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (98 loc) · 2.64 KB
/
docker-compose.yml
File metadata and controls
106 lines (98 loc) · 2.64 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: "3.1"
services:
usersapi:
image: virtualfinland/usersapi:latest
build:
context: ./VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI
dockerfile: ${USERAPI_DOCKERFILE:-Dockerfile}
ports:
- 5001:80
environment:
ASPNETCORE_ENVIRONMENT: local
CONNECTIONSTRINGS__DEFAULTCONNECTION: Host=postgresdb;Database=postgres;Username=appuser;Password=password
AWS_REGION: eu-north-1
REDIS_ENDPOINT: redis:6379
"Services__Codesets__ApiEndpoint": ${CodesetApiBaseUrl:-http://host.docker.internal:3166/resources}
depends_on:
postgresdb:
condition: service_healthy
usersapi-local-initialization:
condition: service_completed_successfully
networks:
- vfd-network
extra_hosts:
- "host.docker.internal:host-gateway"
usersapi-local-initialization:
image: virtualfinland/usersapi-adminfunction-cli:latest
build:
context: ./
dockerfile: ./VirtualFinland.UsersAPI.AdminFunction.CLI/Dockerfile
command: >
bash -c "
set -e
echo '> Initializing local database..'
dotnet run --project ./VirtualFinland.UsersAPI.AdminFunction.CLI InitializeDatabase
echo '> Initialization script executed successfully.';
"
environment:
ASPNETCORE_ENVIRONMENT: local
CONNECTIONSTRINGS__DEFAULTCONNECTION: Host=postgresdb;Database=postgres;Username=postgres;Password=example
AWS_REGION: eu-north-1
DATABASE_USER: appuser
DATABASE_PASSWORD: password
depends_on:
postgresdb:
condition: service_healthy
networks:
- vfd-network
extra_hosts:
- "host.docker.internal:host-gateway"
labels:
- "traefik.enable=false"
postgresdb:
image: postgres:14
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: example
POSTGRES_USER: postgres
volumes:
- postgresdb:/var/lib/postgresql/data
networks:
- vfd-network
labels:
- "traefik.enable=false"
adminer:
image: adminer
ports:
- 8080:8080
networks:
- vfd-network
redis:
image: redis:6.2.13-alpine
ports:
- 6379:6379
networks:
- vfd-network
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
platform: linux/amd64
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- 8082:8081
networks:
- vfd-network
volumes:
postgresdb:
networks:
vfd-network:
external: true
driver: bridge