diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-29 23:37:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-30 00:26:47 +0900 |
| commit | 6d35f66e3502b61c0386f719d3a5f3caf0e109b6 (patch) | |
| tree | 52df261d453e89619e1b1ad5f9918607136ea7f8 /Makefile.prod | |
| parent | b7e2d4571b61f20a9f4a288f41ba0a30e488eda4 (diff) | |
| download | iosdc-japan-2024-albatross-6d35f66e3502b61c0386f719d3a5f3caf0e109b6.tar.gz iosdc-japan-2024-albatross-6d35f66e3502b61c0386f719d3a5f3caf0e109b6.tar.zst iosdc-japan-2024-albatross-6d35f66e3502b61c0386f719d3a5f3caf0e109b6.zip | |
feat: separate Makefile and compose.yaml for local/prod envs
Diffstat (limited to 'Makefile.prod')
| -rw-r--r-- | Makefile.prod | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile.prod b/Makefile.prod new file mode 100644 index 0000000..05901f0 --- /dev/null +++ b/Makefile.prod @@ -0,0 +1,39 @@ +DOCKER_COMPOSE := docker compose -f compose.prod.yaml + +.PHONY: build +build: + ${DOCKER_COMPOSE} build + +.PHONY: up +up: + ${DOCKER_COMPOSE} up -d + +.PHONY: down +down: + ${DOCKER_COMPOSE} down + +.PHONY: logs +logs: + ${DOCKER_COMPOSE} logs + +.PHONY: psql +psql: + ${DOCKER_COMPOSE} up --wait db + ${DOCKER_COMPOSE} exec db psql --user=postgres albatross + +.PHONY: psql-query +psql-query: + ${DOCKER_COMPOSE} up --wait db + ${DOCKER_COMPOSE} exec --no-TTY db psql --user=postgres albatross + +.PHONY: sqldef-dryrun +sqldef-dryrun: down + ${DOCKER_COMPOSE} build db + ${DOCKER_COMPOSE} up --wait db + ${DOCKER_COMPOSE} run --no-TTY tools psqldef --dry-run < ./backend/schema.sql + +.PHONY: sqldef +sqldef: down + ${DOCKER_COMPOSE} build db + ${DOCKER_COMPOSE} up --wait db + ${DOCKER_COMPOSE} run --no-TTY tools psqldef < ./backend/schema.sql |
