File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+ services :
3
+ postgres :
4
+ image : postgres:9.6
5
+ environment :
6
+ POSTGRES_DB : cargo_registry
7
+ POSTRES_USER : postgres
8
+ POSTGRES_PASSWORD : password
9
+ ports :
10
+ - 5432:5432
11
+ volumes :
12
+ - postgres-data:/var/lib/postgresql/data
13
+ backend :
14
+ build :
15
+ context : .
16
+ dockerfile : backend.Dockerfile
17
+ environment :
18
+ DATABASE_URL : postgres://postgres:password@postgres/cargo_registry
19
+ SESSION_KEY : badkeyabcdefghijklmnopqrstuvwxyzabcdef
20
+ GIT_REPO_URL : file://./tmp/index-bare
21
+ GIT_REPO_CHECKOUT : ./tmp/index-co
22
+ GH_CLIENT_ID : " "
23
+ GH_CLIENT_SECRET : " "
24
+ links :
25
+ - postgres
26
+ ports :
27
+ - 8888:8888
28
+ volumes :
29
+ # Mount the src/ directory so we don't have to rebuild the Docker image
30
+ # when we want to change some code
31
+ - ./src:/app/src
32
+ - index:/app/tmp
33
+ - cargo-cache:/app/target
34
+ frontend :
35
+ build :
36
+ context : .
37
+ dockerfile : frontend.Dockerfile
38
+ entrypoint : yarn run start --proxy http://backend:8888
39
+ links :
40
+ - backend
41
+ ports :
42
+ - 4200:4200
43
+ volumes :
44
+ # Mount the app/ directory so live reload works
45
+ - ./app:/app/app
46
+
47
+ volumes :
48
+ postgres-data :
49
+ cargo-cache :
50
+ index :
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- diesel migration run
3
+ # If the backend is started before postgres is ready, the migrations will fail
4
+ until diesel migration run; do
5
+ echo " Migrations failed, retrying in 5 seconds..."
6
+ sleep 5
7
+ done
8
+
4
9
./script/init-local-index.sh
5
10
6
11
cargo run --bin server
You can’t perform that action at this time.
0 commit comments