-
Notifications
You must be signed in to change notification settings - Fork 16
/
run.sh
executable file
·30 lines (22 loc) · 883 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
IMAGE_VERSION=1.9.2
CONTAINER_CMD="finch"
CONTAINER_REPO="guessi/docker-yourls"
function build() {
${CONTAINER_CMD} build -t ${CONTAINER_REPO}:${IMAGE_VERSION} --target yourls .
${CONTAINER_CMD} build -t ${CONTAINER_REPO}:${IMAGE_VERSION}-theme --target theme .
${CONTAINER_CMD} build -t ${CONTAINER_REPO}:${IMAGE_VERSION}-noadmin --target noadmin .
}
function publish() {
${CONTAINER_CMD} push ${CONTAINER_REPO}:${IMAGE_VERSION}
${CONTAINER_CMD} push ${CONTAINER_REPO}:${IMAGE_VERSION}-theme
${CONTAINER_CMD} push ${CONTAINER_REPO}:${IMAGE_VERSION}-noadmin
${CONTAINER_CMD} tag ${CONTAINER_REPO}:${IMAGE_VERSION} ${CONTAINER_REPO}:latest
${CONTAINER_CMD} push ${CONTAINER_REPO}
}
function cleanup() {
${CONTAINER_CMD} compose down
rm -rvf ./volumes/docker-entrypoint-initdb.d/*
${CONTAINER_CMD} volume rm yourls_mysql-data
}
$@