forked from Sddilora/Glamify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (37 loc) · 1.01 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
version: '3'
services:
ecommerce-db:
restart: always
image: "postgres:15.0-alpine"
container_name: ecommerce-db
ports:
- "5432:5432"
environment:
- POSTGRES_DB=ecommerce
- POSTGRES_USER=ecommerce
- POSTGRES_PASSWORD=ecommerce
ecommerce-backend:
# image: 'docker-spring-boot-postgres:latest'
build: ./backend
container_name: ecommerce-backend
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://ecommerce-db:5432/ecommerce
- SPRING_DATASOURCE_USERNAME=ecommerce
- SPRING_DATASOURCE_PASSWORD=ecommerce
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SERVER_PORT=8191
ports:
- "8191:8191" # the first port is the port on the host machine, the second is the port in the container
depends_on:
- ecommerce-db
links:
- ecommerce-db
ecommerce-frontend:
build: ./frontend
container_name: ecommerce-frontend
ports:
- "4200:4200"
depends_on:
- ecommerce-db
links:
- ecommerce-backend