Skip to content

Commit 444c1a4

Browse files
committed
chore(ci): create 3 databases on start
1 parent efdbc27 commit 444c1a4

File tree

3 files changed

+40
-7
lines changed

3 files changed

+40
-7
lines changed

Micro.AppRegistration.Api/appsettings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"DatabaseConfig": {
1414
"Host": "localhost",
1515
"Port": 15433,
16-
"Name": "starter_db",
17-
"User": "starter",
18-
"Password": "secret"
16+
"Name": "app_registration",
17+
"User": "postgres",
18+
"Password": "postgres"
1919
},
2020
"MetricsOptions": {
2121
"InfluxDb": {

docker-compose.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,43 @@
11
version: '3'
22
services:
3+
key_store:
4+
image: fossapps/micro.keystore:1.9.1
5+
ports:
6+
- 15000:15000
7+
environment:
8+
- ASPNETCORE_URLS=http://+:15000
9+
- DatabaseConfig__AutoMigrate=true
10+
- DatabaseConfig__Host=postgres
11+
- DatabaseConfig__Port=5432
12+
- DatabaseConfig__Name=keys
13+
- DatabaseConfig__User=postgres
14+
- DatabaseConfig__Password=postgres
15+
depends_on:
16+
- postgres
17+
auth:
18+
image: fossapps/micro.auth:1.7.0
19+
ports:
20+
- 25000:25000
21+
environment:
22+
- ASPNETCORE_URLS=http://+:25000
23+
- DatabaseConfig__AutoMigrate=true
24+
- DatabaseConfig__Host=postgres
25+
- DatabaseConfig__Port=5432
26+
- DatabaseConfig__Name=auth
27+
- DatabaseConfig__User=postgres
28+
- DatabaseConfig__Password=postgres
29+
- Services__KeyStore__Url=http://key_store:15000
30+
depends_on:
31+
- postgres
332
postgres:
433
image: postgres:11-alpine
34+
volumes:
35+
- ./extras/docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
536
ports:
6-
- 15433:5432
37+
- 15432:5432
738
environment:
8-
- POSTGRES_PASSWORD=secret
9-
- POSTGRES_USER=starter
10-
- POSTGRES_DB=starter_db
39+
- POSTGRES_PASSWORD=postgres
40+
- POSTGRES_USER=postgres
1141
influxdb:
1242
image: influxdb
1343
environment:

extras/docker_postgres_init.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE DATABASE auth WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1;
2+
CREATE DATABASE keys WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1;
3+
CREATE DATABASE app_registration WITH OWNER = postgres ENCODING = 'UTF8' CONNECTION LIMIT = -1;

0 commit comments

Comments
 (0)