-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (46 loc) · 1.58 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
#create a volume for the my sql container.To ensure Data persists after my sql container is stopped
volumes:
datafiles:
services:
mysql_db:
container_name: 'mysql_ctr'
image: mysql/mysql-server
environment:
# change this for a "real" app!
MYSQL_ROOT_PASSWORD: 123456
# MYSQL_ROOT_HOST: 172.21.0.1
MYSQL_RANDOM_ROOT_PASSWORD: 123456
MYSQL_DATABASE: rosas-db
MYSQL_USER: dbuser
MYSQL_PASSWORD: 123456
#Specify where the persisted Data should be stored
volumes:
- datafiles:/var/lib/mysql
- "~/sql-scripts/setup.sql:/docker-entrypoint-initdb.d/1.sql"
restart: always
ports:
- "3308:3306"
rosas_api:
build:
context: .
dockerfile: src/Roaa.Rosas.API/Dockerfile
container_name: 'rosas_api_ctr'
#Map port 80 in the docker container to port 80 in the Api
ports:
- "80:80"
- "443:443"
# - 80
# - 443 61314
volumes:
- ~/.aspnet/https:/https:ro
#Specify Environment Variables for the Api Service
environment:
ASPNETCORE_ENVIRONMENT: dev
CONNECTIONSTRINGS__IDS4CONFIGURATIONDB: "Server=mysql_db;Database=rosas-db;User=dbuser;Password=123456;"
CONNECTIONSTRINGS__IDS4PERSISTEDGRANTDB: "Server=mysql_db;Database=rosas-db;User=dbuser;Password=123456;"
CONNECTIONSTRINGS__IDENTITYDB: "Server=mysql_db;Database=rosas-db;User=dbuser;Password=123456;"
IDENTITYSERVER__URL: "http://localhost"
ASPNETCORE_URLS: http://+:80
#This Service Depends on the database service specifed above
depends_on:
- "mysql_db"