Fix Docker Compose to use cached images instead of rebuilding
- Changed pull_policy from 'build' to 'missing' for frontend and backend - Added explicit image names (mad-lawsuit-frontend:latest, mad-lawsuit-backend:latest) - This prevents unnecessary rebuilds on server when restarting containers - Images will only rebuild when explicitly requested or when missing
This commit is contained in:
parent
ba654296e9
commit
1d37b1fdae
1 changed files with 4 additions and 2 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
|
image: mad-lawsuit-frontend:latest
|
||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
pull_policy: build
|
pull_policy: missing
|
||||||
ports:
|
ports:
|
||||||
- "806:806"
|
- "806:806"
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -17,10 +18,11 @@ services:
|
||||||
- caddy_network
|
- caddy_network
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
|
image: mad-lawsuit-backend:latest
|
||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
pull_policy: build
|
pull_policy: missing
|
||||||
ports:
|
ports:
|
||||||
- "901:3001"
|
- "901:3001"
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue