-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (46 loc) · 2.1 KB
/
docker-compose.yml
File metadata and controls
50 lines (46 loc) · 2.1 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
version: '3'
# define all microservices that
# make up the whole application
services:
db: # PostgreSQL database
image: postgres:alpine # docker image (https://hub.docker.com/_/postgres)
restart: always # always restart the db when the app restarts
networks: # specify the IP address of the database
kiv-pia-silhavyj-network:
ipv4_address: 10.5.0.5
environment:
- POSTGRES_DB=pia-silhavyj # database name
- POSTGRES_USER=postgres # database "root" user
- POSTGRES_PASSWORD=password # database "root" password
- "TZ=Europe/Prague" # timezone
ports:
- "5432:5432" # expose port 5432 (PostgreSQL) out of the docker container to the local machine
mail: # email server (can be replaced with gmail later on)
image: maildev/maildev # docker image (https://hub.docker.com/r/maildev/maildev)
restart: always # always restart the server when the app restarts
networks: # specify the IP address of the mail server
kiv-pia-silhavyj-network:
ipv4_address: 10.5.0.6
ports:
- "25:25" # expose port 25 (SMTP) out of the docker container to the local machine
- "8086:80" # expose port 80 (HTTP - web UI) out of the docker container to the local machine
environment:
- "TZ=Europe/Prague" # timezone
app: # Spring boot application
build: .
ports:
- "8085:8080" # expose port 8080 (web interface) out of the docker container do the local machine
environment:
- "TZ=Europe/Prague" # timezone
networks:
kiv-pia-silhavyj-network: # specify the IP address of the application
ipv4_address: 10.5.0.7
depends_on:
- db
- mail
networks: # definition of the subnet within Docker
kiv-pia-silhavyj-network:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16