-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose.yaml
70 lines (66 loc) · 2.06 KB
/
docker-compose.yaml
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
64
65
66
67
68
69
70
version: '3.8'
services:
yew-ui:
volumes:
- type: bind
source: ../
target: /app
- yew-ui-target-cache:/app/yew-ui/target
- yew-ui-cargo-registry-cache:/usr/local/cargo/registry
build:
dockerfile: ../docker/Dockerfile.yew
command: bash -c "cd app/yew-ui && trunk serve --address 0.0.0.0 --port ${TRUNK_SERVE_PORT:-80}"
environment:
- ACTIX_PORT=${ACTIX_PORT:-8080}
- TRUNK_SERVE_PORT=${TRUNK_SERVE_PORT:-80}
- ENABLE_OAUTH=true
- LOGIN_URL=http://localhost:${ACTIX_PORT:-8080}/login
ports:
- "${TRUNK_SERVE_PORT:-80}:${TRUNK_SERVE_PORT:-80}"
actix-api:
build:
dockerfile: ../docker/Dockerfile.actix
command: bash -c "cd app/actix-api && cargo watch -x \"run\""
environment:
- ACTIX_PORT=${ACTIX_PORT:-8080}
- TRUNK_SERVE_PORT=${TRUNK_SERVE_PORT:-80}
- TRUNK_SERVE_HOST=localhost
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID}
- OAUTH_AUTH_URL=${OAUTH_AUTH_URL}
- OAUTH_TOKEN_URL=${OAUTH_TOKEN_URL}
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
- OAUTH_REDIRECT_URL=http://localhost:${ACTIX_PORT:-8080}/login/callback
- RUST_LOG=info
- PG_URL=postgres://postgres:docker@postgres:5432/actix-api-db?sslmode=disable
- DBMATE_MIGRATIONS_DIR=/app/dbmate/db/migrations
ports:
- "${ACTIX_PORT:-8080}:${ACTIX_PORT:-8080}"
volumes:
- type: bind
source: ../
target: /app
- actix-api-target-cache:/app/actix-api/target
- actix-api-cargo-registry-cache:/usr/local/cargo/registry
depends_on:
- postgres
dbmate:
volumes:
- ../dbmate/db:/app/db
build:
context: ../dbmate
environment:
DATABASE_URL: "postgres://postgres:docker@postgres:5432/actix-api-db?sslmode=disable"
depends_on:
- postgres
postgres:
image: postgres:12
environment:
POSTGRES_PASSWORD: "docker"
PGPASSWORD: "docker"
ports:
- 5432
volumes:
actix-api-cargo-registry-cache:
actix-api-target-cache:
yew-ui-target-cache:
yew-ui-cargo-registry-cache: