forked from rust-lang/crates.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (65 loc) · 1.66 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
64
65
66
67
68
69
70
71
72
version: "3.4"
x-backend: &backend
build:
context: .
dockerfile: backend.Dockerfile
environment:
DEV_DOCKER: "true"
DATABASE_URL: postgres://postgres:password@postgres/cargo_registry
SESSION_KEY: badkeyabcdefghijklmnopqrstuvwxyzabcdef
GIT_REPO_URL: file:///app/tmp/index-bare
GH_CLIENT_ID: ""
GH_CLIENT_SECRET: ""
WEB_ALLOWED_ORIGINS: http://localhost:8888,http://localhost:4200
links:
- postgres
volumes:
# Mount the src/ directory so we don't have to rebuild the Docker image
# when we want to change some code
- ./src:/app/src:ro
- index:/app/tmp
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
- local-uploads:/app/local_uploads
services:
postgres:
image: postgres:13@sha256:eee22204934b36935237e7c92355e3178cfdf3c5377dec9c19c848115cc4637b
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 127.0.0.1:5432:5432
volumes:
- ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- postgres-data:/var/lib/postgresql/data
backend:
<<: *backend
ports:
- 8888:8888
depends_on:
- postgres
worker:
<<: *backend
entrypoint: cargo run --bin background-worker
depends_on:
- backend
frontend:
build:
context: .
dockerfile: frontend.Dockerfile
environment:
PROXY_BACKEND: http://backend:8888
entrypoint: pnpm start
links:
- backend
ports:
- 4200:4200
volumes:
# Mount the app/ directory so live reload works
- ./app:/app/app:ro
volumes:
postgres-data:
cargo-cache:
target-cache:
index:
local-uploads: