-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (50 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
48
49
50
51
#version: "3"
#
#volumes:
# dbdata:
#
#services:
# psqldb:
# image:
# postgres:alpine3.18
# environment:
# - POSTGRES_DB=fit_world
# env_file:
# - ./env/postgres.env
# volumes:
# - dbdata:/var/lib/postgresql/data
services:
backend:
depends_on:
- db
build: . # swagger_rest # backend
ports:
- 8080:8080
environment:
- POSTGRES_DB=fit_world
- SPRING_DATASOURCE_URL=jdbc:postgresql://db/fit_world
networks:
- spring-postgres
db:
image: postgres
restart: unless-stopped
secrets:
- db-password
volumes:
- db-data:/var/lib/postgresql/data
- ./create_database.sql:/docker-entrypoint-initdb.d/create_tables.sql
networks:
- spring-postgres
environment:
- POSTGRES_DB=fit_world
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
- POSTGRES_PASSWORD=penon.veserti
expose:
- 5432
volumes:
db-data:
secrets:
db-password:
file: db/password.txt
networks:
spring-postgres: