-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (32 loc) · 867 Bytes
/
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
version: "3"
services:
database-diesel:
container_name: database-diesel
image: postgres:${POSTGRES_VERSION:-13}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-diesel}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_USER: ${POSTGRES_USER:-diesel}
ports:
- "5432:5432"
volumes:
- db-diesel:/var/lib/postgresql/data:rw
diesel-learn:
container_name: diesel-learn
stdin_open: true
tty: true
environment:
- DATABASE_URL=postgres://${POSTGRES_USER:-diesel}:${POSTGRES_PASSWORD:-password}@database-diesel/${POSTGRES_DB:-diesel}
build:
context: ./
dockerfile: ./Dockerfile
volumes:
- ./:/diesel-learn
- diesel-learn-target:/diesel/target
depends_on:
- database-diesel
volumes:
# postgres data
db-diesel:
# rust data
diesel-learn-target: