make install
This commit is contained in:
parent
4f3021c323
commit
bc0c5d477b
10
Makefile
10
Makefile
|
@ -1,5 +1,7 @@
|
||||||
MYOS ?= ../myos
|
MYOS ?= ../myos
|
||||||
MYOS_REPOSITORY ?= https://github.com/aynicos/myos
|
MYOS_REPOSITORY ?= $(patsubst %/$(APP),%/myos,$(APP_REPOSITORY))
|
||||||
|
APP ?= $(lastword $(subst /, ,$(APP_REPOSITORY)))
|
||||||
|
APP_REPOSITORY ?= $(shell git config --get remote.origin.url 2>/dev/null)
|
||||||
-include $(MYOS)/make/include.mk
|
-include $(MYOS)/make/include.mk
|
||||||
$(MYOS):
|
$(MYOS):
|
||||||
-@git clone $(MYOS_REPOSITORY) $(MYOS)
|
-@git clone $(MYOS_REPOSITORY) $(MYOS)
|
||||||
|
@ -10,7 +12,8 @@ SHELL_FILES ?= $(wildcard .*/*.sh */*.sh */*/*.sh)
|
||||||
all: install tests
|
all: install tests
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: build myos up player
|
install: myos build up player
|
||||||
|
echo "Welcome to myos docker land - make a user - make a player -"
|
||||||
|
|
||||||
.PHONY: migrate
|
.PHONY: migrate
|
||||||
migrate-%: home := ~/.zen/game/players
|
migrate-%: home := ~/.zen/game/players
|
||||||
|
@ -47,4 +50,3 @@ tests: shellcheck
|
||||||
|
|
||||||
.PHONY: upgrade
|
.PHONY: upgrade
|
||||||
upgrade: migrate-home migrate-ipfs install
|
upgrade: migrate-home migrate-ipfs install
|
||||||
echo "Welcome to myos docker land - make a user - make a player -"
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ VOLUME "/home/$USER/Astroport"
|
||||||
|
|
||||||
# homedir
|
# homedir
|
||||||
RUN mkdir -p "/home/$USER/.ipfs" "/home/$USER/.zen/game/players" "/home/$USER/Astroport" \
|
RUN mkdir -p "/home/$USER/.ipfs" "/home/$USER/.zen/game/players" "/home/$USER/Astroport" \
|
||||||
&& chown "$USER" "/home/$USER/.ipfs" "/home/$USER/.zen/game/players" "/home/$USER/Astroport"
|
&& chown -R "$USER" "/home/$USER"
|
||||||
|
|
||||||
HEALTHCHECK CMD [ $(ps aux |grep 'nc -l -p' |wc -l) -lt 199 ] && echo -n OK
|
HEALTHCHECK CMD [ $(ps aux |grep 'nc -l -p' |wc -l) -lt 199 ] && echo -n OK
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,9 @@ log() {
|
||||||
}
|
}
|
||||||
|
|
||||||
zen() {
|
zen() {
|
||||||
|
mkdir -p /home/zen/Astroport
|
||||||
|
sudo chown zen:users /home/zen /home/zen/.zen /home/zen/.zen/game /home/zen/.zen/game/players
|
||||||
[ -d "$ASTROPORT_DIR" ] && cd "$ASTROPORT_DIR" && git pull -q || git clone -q "$ASTROPORT_REPO" "$ASTROPORT_DIR"
|
[ -d "$ASTROPORT_DIR" ] && cd "$ASTROPORT_DIR" && git pull -q || git clone -q "$ASTROPORT_REPO" "$ASTROPORT_DIR"
|
||||||
sudo chown zen /home/zen/.zen/game/players
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${1:-${cmd:-start}}" in
|
case "${1:-${cmd:-start}}" in
|
||||||
|
|
|
@ -12,12 +12,10 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
tty: true
|
tty: true
|
||||||
volumes:
|
volumes:
|
||||||
- data:/home/zen/Astroport:cached
|
|
||||||
- home:/home/zen/.zen/game/players:delegated
|
- home:/home/zen/.zen/game/players:delegated
|
||||||
- ipfs:/home/zen/.ipfs:cached,ro
|
- ipfs:/home/zen/.ipfs:cached,ro
|
||||||
working_dir: /home/zen
|
working_dir: /home/zen
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
|
||||||
home:
|
home:
|
||||||
ipfs:
|
ipfs:
|
||||||
|
|
Loading…
Reference in New Issue