-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.24 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
48
49
50
51
52
53
54
version: '3.9'
services:
postgres:
image: postgres:latest
container_name: quick_buy_server
hostname: postgres
expose:
- 5432
ports:
- 5432:5432
restart: unless-stopped
environment:
POSTGRES_USER: oussama
POSTGRES_PASSWORD: admin
POSTGRES_DB: quick_buy_db
volumes:
- postgres-data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
container_name: spring_server_manager
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: oussama213
ports:
- 5050:80
volumes:
- pgadmin-data:/var/lib/pgadmin
depends_on:
- postgres
restart: unless-stopped
spring-app:
build:
context: .
dockerfile: Dockerfile # Ensure the Dockerfile is correctly named and in the root directory
container_name: quick_buy_app
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/quick_buy_db
SPRING_DATASOURCE_USERNAME: oussama
SPRING_DATASOURCE_PASSWORD: admin
# Add any other Spring environment variables as needed
ports:
- 8080:8080
expose:
- 8080
depends_on:
- postgres
restart: unless-stopped
volumes:
postgres-data:
pgadmin-data: