-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
63 lines (59 loc) · 1.63 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3.5"
services:
db:
container_name: ratings-db
build: ./docker/database
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "@1234"
PGPASSWORD: "@1234" # Used by "sudo make db-shell"
MIGRATION_USER: "migration_user"
MIGRATION_PASSWORD: "strongpassword"
SERVICE_USER: "service"
SERVICE_PASSWORD: "covfefe!1"
RATINGS_DB: "ratings"
ratings:
container_name: ratings
build: ./docker/local
ports:
- 8080:8080
environment:
RUST_LOG: "ratings=debug,hyper=error"
APP_HOST: "0.0.0.0"
APP_JWT_SECRET: "deadbeef"
APP_PORT: "8080"
APP_POSTGRES_URI: "postgresql://migration_user:strongpassword@db:5432/ratings"
APP_SNAPCRAFT_IO_URI: "http://snapcraft-mock:11111/"
#APP_SNAPCRAFT_IO_URI: "https://api.snapcraft.io/v2/"
APP_ADMIN_USER: "shadow"
APP_ADMIN_PASSWORD: "maria"
SKIP_CACHE: "true"
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
entrypoint: "cargo watch -i 'tests/**' -x run"
depends_on:
- db
healthcheck:
test: [ "CMD-SHELL", "nc -z -w5 localhost 8080" ]
interval: 5s
retries: 50
snapcraft-mock:
container_name: snapcraft-mock
build: ./docker/local
ports:
- 11111:11111
volumes:
- ./mock_server/:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
environment:
RUST_LOG: "info,hyper=error"
entrypoint: "cargo watch -i 'tests/**' -x run"
volumes:
cargo-cache: null
target-cache: null