-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (67 loc) · 2.39 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
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
version: '3.7'
services:
weatherGrabber.api:
image: weathergrabber
build:
context: .
dockerfile: src/WeatherGrabber.Api/Dockerfile
depends_on:
- mongo
hostname: '${COMPUTERNAME:-}${HOSTNAME:-}' # COMPUTERNAME - Windows, HOSTNAME - Linux, both - hopefully nowhere
env_file:
- .generated.env
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
# - ASPNETCORE_URLS=https://+:443;http://+:80
# - ASPNETCORE_HTTPS_PORT=${DEFAULT_HOST_HTTPS_PORT} # use the SAME port as in 443 port's binding
- CONNECTIONSTRINGS=mongodb://${DEFAULT_MONGO_USER}:${DEFAULT_MONGO_PASSWORD}@localhost:${DEFAULT_MONGO_PORT}/${DEFAULT_MONGO_DB}
ports:
- ${DEFAULT_HOST_HTTP_PORT}:80
# - ${DEFAULT_HOST_HTTPS_PORT}:443
volumes:
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
weatherGrabber.worker:
image: weathergrabber_worker
build:
context: .
dockerfile: src/WeatherGrabber.Worker/Dockerfile
depends_on:
- mongo
hostname: '${COMPUTERNAME:-}${HOSTNAME:-}' # COMPUTERNAME - Windows, HOSTNAME - Linux, both - hopefully nowhere
env_file:
- .generated.env
environment:
- CONNECTIONSTRINGS=mongodb://${DEFAULT_MONGO_USER}:${DEFAULT_MONGO_PASSWORD}@localhost:27017
- DEFAULTDATABASE=${DEFAULT_MONGO_DB}
mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=${DEFAULT_MONGO_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DEFAULT_MONGO_PASSWORD}
- MONGO_INITDB_DATABASE=${DEFAULT_MONGO_DB}
ports:
- ${DEFAULT_MONGO_PORT}:27017
scripts:
image: scripts
build:
context: .
dockerfile: src/WeatherGrabber.Scripts/Dockerfile
ports:
- ${DEFAULT_HOST_SCRIPTS_PORT}:3000
mongo-express:
image: mongo-express
environment:
- ME_CONFIG_MONGODB_SERVER=mongo
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
- ME_CONFIG_MONGODB_ADMINUSERNAME=${DEFAULT_MONGO_USER}
- ME_CONFIG_MONGODB_ADMINPASSWORD=${DEFAULT_MONGO_PASSWORD}
- ME_CONFIG_BASICAUTH_USERNAME=${MONGOEXPRESS_LOGIN}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGOEXPRESS_PASSWORD}
links:
- mongo
ports:
- ${MONGOEXPRESS_PORT}:8081