45 lines
828 B
YAML
45 lines
828 B
YAML
#version: "3.8"
|
|
#
|
|
#services:
|
|
# mailhog:
|
|
# image: mailhog/mailhog
|
|
# container_name: mailhog
|
|
# restart: always
|
|
# ports:
|
|
# - "1025:1025"
|
|
# - "8025:8025"
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16
|
|
container_name: postgres_db
|
|
restart: always
|
|
ports:
|
|
- "5436:5432"
|
|
environment:
|
|
POSTGRES_DB: mydatabase
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: 123
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
|
|
ktor_api:
|
|
build: .
|
|
container_name: ktor_api
|
|
restart: always
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
DATABASE_URL: jdbc:postgresql://db:5432/mydatabase
|
|
DATABASE_USER: postgres
|
|
DATABASE_PASSWORD: 123
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|