aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile.prod
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.prod')
-rw-r--r--Makefile.prod31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile.prod b/Makefile.prod
new file mode 100644
index 0000000..efb551e
--- /dev/null
+++ b/Makefile.prod
@@ -0,0 +1,31 @@
+DOCKER_COMPOSE := docker-compose -f docker-compose.prod.yml --env-file .env.prod
+
+.PHONY: build
+build: build-assets
+ ${DOCKER_COMPOSE} build
+ ${DOCKER_COMPOSE} up -d albatross-db
+ ${DOCKER_COMPOSE} run --rm --entrypoint="php bin/albctl migrate" albatross-jobworker
+
+.PHONY: serve
+serve:
+ ${DOCKER_COMPOSE} up -d
+
+.PHONY: clean
+clean:
+ ${DOCKER_COMPOSE} down
+
+.PHONY: promote
+promote:
+ ${DOCKER_COMPOSE} run --rm --entrypoint="php bin/albctl promote" albatross-jobworker
+
+.PHONY: logs
+logs:
+ ${DOCKER_COMPOSE} logs
+
+.PHONY: build-assets
+build-assets: services/app/public/assets
+ docker build -t albatross-build-assets -f services/app/Dockerfile.frontend ./services/app
+ docker run --rm -v "$$(pwd)"/services/app/esbuild.mjs:/app/esbuild.mjs -v "$$(pwd)"/services/app/assets:/app/assets -v "$$(pwd)"/services/app/public/assets:/app/public/assets --env-file "$$(pwd)"/.env.prod albatross-build-assets npm run build
+
+services/app/public/assets:
+ @mkdir -p services/app/public/assets