-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
47 lines (42 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
42
43
44
45
46
47
version: "3.9"
services:
db:
container_name: shop-db
image: postgres:15
hostname: "psql_docker"
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "1234"
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./shop-server/sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
- ./shop-server/sql/fill_tables.sql:/docker-entrypoint-initdb.d/fill_tables.sql
networks:
- postgres
api:
depends_on:
- "db"
container_name: shop-server
build: ./shop-server
ports:
- "8080:8080"
networks:
- postgres
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/postgres
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=1234
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
front:
container_name: shop-client
build: ./shop-client
ports:
- "4200:4200"
networks:
postgres:
driver: bridge
volumes:
postgres: