Skip to content

Commit

Permalink
fix: store cargo registry in .docker to prevent redownloads
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Kyle Clemens committed Jul 12, 2018
1 parent fce1d86 commit a4a7cf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ version: '3'
services:
backend:
build: run
command: /run.sh --release
command: /run.sh --release --verbose
restart: unless-stopped
volumes:
- "../:/paste"
- "./run/.cargo/registry:/root/.cargo/registry"
- "./run/.cargo/git:/root/.cargo/git"
depends_on:
- postgres
- redis
Expand All @@ -13,8 +16,10 @@ services:
- ROCKET_ENV=prod
redis:
image: redis:alpine
restart: unless-stopped
postgres:
image: postgres:alpine
restart: unless-stopped
environment:
- POSTGRES_USER=paste
- POSTGRES_PASSWORD=paste
Expand All @@ -26,7 +31,7 @@ services:
- "../:/paste"
nginx:
image: nginx:alpine
restart: always
restart: unless-stopped
depends_on:
- backend
ports:
Expand Down
Empty file added .docker/run/.cargo/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
.docker/nginx/certs/*
.docker/nginx/sites/*.conf
.docker/nginx/nginx.conf

.docker/run/.cargo/registry
.docker/run/.cargo/git

0 comments on commit a4a7cf5

Please sign in to comment.