Adrià Vilanova Martínez | 6052433 | 2022-11-20 02:33:56 +0100 | [diff] [blame] | 1 | MUTABLE_VERSION ?= latest |
| 2 | VERSION ?= $(shell git rev-parse --short HEAD) |
| 3 | |
| 4 | IMAGE_PROD := avm99963/fisipastanagapp |
| 5 | |
| 6 | docker-prod: Dockerfile |
| 7 | docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) . |
| 8 | docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION) |
| 9 | |
| 10 | push-prod: docker-prod |
| 11 | docker push $(IMAGE_PROD):$(VERSION) |
Adrià Vilanova Martínez | 8fd915b | 2022-12-10 20:27:10 +0100 | [diff] [blame] | 12 | |
| 13 | # First copy .env.sample to .env and docker-compose.yml.sample to |
| 14 | # docker-compose.yml, and change them as you wish. |
| 15 | run-local: docker-prod |
| 16 | docker-compose up |