-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (61 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
67 lines (61 loc) · 1.52 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
services:
# Web API Application
loyalty_api:
container_name: api_container
ports:
- "5000:5000"
depends_on:
- loyalty_postgres_db
build:
context: .
dockerfile: Dockerfile
environment:
- ConnectionStrings__Database=Server=postgres_db_container;Port=5432;Database=CustomerLoyaltyDB;Username=postgres;Password=mysecretpassword;
- ASPNETCORE_URLS=http://+:5000
networks:
- loyalty_network
# PostgreSQL Database
loyalty_postgres_db:
container_name: postgres_db_container
image: postgres:latest
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
PGDATA: /data/postgres
volumes:
- loyalty_postgres_data:/data/postgres
ports:
- "5433:5432"
networks:
- loyalty_network
restart: unless-stopped
# PGAdmin User-Interface
loyalty_pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: admin@gmail.com
PGADMIN_DEFAULT_PASSWORD: mysecretpassword
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- loyalty_pgadmin_data:/var/lib/pgadmin
ports:
- "8000:80"
networks:
- loyalty_network
restart: unless-stopped
# Redis Cache
loyalty_redis:
container_name: redis_container
image: redis
ports:
- "6379:6379"
networks:
- loyalty_network
restart: unless-stopped
networks:
loyalty_network:
driver: bridge
volumes:
loyalty_postgres_data:
loyalty_pgadmin_data: