22 lines
505 B
YAML
22 lines
505 B
YAML
|
version: '3.8'
|
||
|
services:
|
||
|
app:
|
||
|
image: 'docker-spring-boot-postgres:latest'
|
||
|
build:
|
||
|
context: .
|
||
|
container_name: app
|
||
|
depends_on:
|
||
|
- db
|
||
|
environment:
|
||
|
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/postgres
|
||
|
- SPRING_DATASOURCE_USERNAME=postgres
|
||
|
- SPRING_DATASOURCE_PASSWORD=zPAwQpsFZC
|
||
|
|
||
|
db:
|
||
|
image: postgres:14.1-alpine
|
||
|
restart: always
|
||
|
environment:
|
||
|
- POSTGRES_USER=postgres
|
||
|
- POSTGRES_PASSWORD=zPAwQpsFZC
|
||
|
ports:
|
||
|
- '5432:5432'
|