social-network/docker-compose.yml

39 lines
844 B
YAML
Raw Normal View History

services:
myspace-database:
image: postgres:15-alpine
hostname: myspace-database
container_name: myspace-database
networks:
myspace-database:
ports:
- 5432:5432
environment:
POSTGRES_DB: myspace
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DATASOURCE_PASSWORD}
volumes:
- myspace-database:/var/lib/postgresql/data/
myspace-backend:
build: .
image: myspace-backend:jvm
hostname: myspace-backend
container_name: myspace-backend
restart: always
ports:
- 8080:8080
networks:
myspace-database:
depends_on:
- myspace-database
environment:
DB_URL: postgresql://myspace-database:5432/myspace
DB_USERNAME: postgres
DB_PASSWORD: ${DATASOURCE_PASSWORD}
volumes:
myspace-database:
networks:
myspace-database: