37 lines
1,002 B
Makefile
37 lines
1,002 B
Makefile
|
# Just configuration
|
||
|
set dotenv-load
|
||
|
|
||
|
# Default variables
|
||
|
default_image := 'gitpot.dev/logolicusz/explorecraft_logolcicusz_knockoff:latest'
|
||
|
default_tag := 'latest'
|
||
|
|
||
|
alias dewit := build
|
||
|
|
||
|
# Run dev server by default
|
||
|
default: dev
|
||
|
|
||
|
_install:
|
||
|
yarn install
|
||
|
|
||
|
# Run vite dev server
|
||
|
dev: _install
|
||
|
@echo "Running vite development server..."
|
||
|
yarn run dev --open
|
||
|
|
||
|
# Run vite preview server
|
||
|
preview: _install
|
||
|
@echo "Running vite preview server..."
|
||
|
yarn run build
|
||
|
yarn run preview --open
|
||
|
|
||
|
# Publish container to Gitpot registry
|
||
|
publish image=default_image:
|
||
|
echo "$GITPOT_TOKEN" | docker login gitpot.dev -u $GITPOT_USERNAME --password-stdin
|
||
|
docker push {{image}}
|
||
|
@echo "Published {{image}} successfuly! Use 'docker pull {{image}}' to pull the container."
|
||
|
|
||
|
|
||
|
# build container image with specified runner (default runner: docker)
|
||
|
build tag=default_tag:
|
||
|
@echo "Running with 'docker' and tagging as '{{tag}}'..."
|
||
|
TAG="{{tag}}" docker compose -f docker-compose.build.yml build
|