-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (39 loc) · 1.11 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
# Please refer https://aka.ms/HTTPSinContainer on how to setup an https developer certificate for your ASP.NET Core service.
version: "3.4"
services:
urlshortener-db:
image: ${DOCKER_REGISTRY-}postgres:latest
container_name: UrlShortener.Db
environment:
- POSTGRES_DB=UrlShortener
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- ./.containers/UrlShortener-db:/var/lib/postgresql/data
ports:
- 5432:5432
urlshortener-api:
image: ${DOCKER_REGISTRY-}urlshortenerapi
container_name: UrlShortener.Api
platform: linux/amd64
depends_on:
- urlshortener-db
build:
context: .
dockerfile: src/url-shortener-api/Dockerfile
ports:
- "5001:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8080
urlshortener-cache:
image: ${DOCKER_REGISTRY-}redis:latest
container_name: UrlShortener.Cache
restart: always
ports:
- "6379:6379"
volumes:
urlshortener-db-data:
networks:
default:
name: urlshortener-network