-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
49 lines (46 loc) · 1.2 KB
/
docker-compose.local.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
version: "3.7"
services:
api-local:
build:
context: .
dockerfile: Dockerfile-local
environment:
TZ: Asia/Tokyo
env_file:
- .env
ports:
- "8080:8080"
volumes:
- ./src:/app/src
- ./static:/app/static
- ./Cargo.toml:/app/Cargo.toml
- ./Cargo.lock:/app/Cargo.lock
- ./rustfmt.toml:/app/rustfmt.toml
# migration
- ./migration/src:/app/migration/src
- ./migration/Cargo.toml:/app/migration/Cargo.toml
- ./migration/Cargo.lock:/app/migration/Cargo.lock
# entity
- ./entity/src:/app/entity/src
- ./entity/Cargo.toml:/app/entity/Cargo.toml
# caches
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
command: ["cargo", "watch", "-x", "run"]
depends_on:
- postgres
postgres:
image: postgres:14.4
environment:
POSTGRES_DB: GKBDB
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker-entrypoint-initdb.d/postgres/create_schema.sql:/docker-entrypoint-initdb.d/create_schema.sql
volumes:
cargo-cache:
target-cache:
postgres-data: