Skip to content

Commit

Permalink
refactor request wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Dec 20, 2017
1 parent 91d4e60 commit 3d25153
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:8-alpine

RUN apk add --update supervisor
RUN apk add --update supervisor git

COPY ./docker /
COPY ./package* /opt/
Expand Down
23 changes: 17 additions & 6 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/usr/bin/env sh

CURRENCY=$1
GITHUB_CLIENT_ID=$2
GITHUB_CLIENT_SECRET=$3
CONTAINER_NAME="$CURRENCY-universal-pool-list"
VIRTUAL_HOST="$CURRENCY-pools.morin.io,$CURRENCY-pools.containers"
VIRTUAL_PORT=8888
LETSENCRYPT_HOST="$CURRENCY-pools.morin.io"
LETSENCRYPT_EMAIL="$CURRENCY[email protected]"
BASE_URL="https://$LETSENCRYPT_HOST"

echo "deploying $CONTAINER_NAME"
echo "CURRENCY: $CURRENCY"
echo "GITHUB_CLIENT_ID: $GITHUB_CLIENT_ID"
echo "VIRTUAL_HOST: $VIRTUAL_HOST"
echo "VIRTUAL_PORT: $VIRTUAL_PORT"
echo "LETSENCRYPT_HOST: $LETSENCRYPT_HOST"
Expand All @@ -18,9 +22,16 @@ echo "CONTAINER_NAME: $CONTAINER_NAME"
docker kill ${CONTAINER_NAME}
docker rm ${CONTAINER_NAME}

docker build --tag ${CONTAINER_NAME} .
docker run --network=containers --name ${CONTAINER_NAME} \
-e VIRTUAL_HOST=${VIRTUAL_HOST} \
-e VIRTUAL_PORT=8888 \
-e CURRENCY=${CURRENCY} \
${CONTAINER_NAME}
docker build --rm -t ${CONTAINER_NAME} .
#docker rm -f ${CONTAINER_NAME}
#docker run --name ${CONTAINER_NAME} \
# -e CURRENCY=${CURRENCY} \
# -e ENV_NAME=${CONTAINER_NAME} \
# -e VIRTUAL_HOST=${VIRTUAL_HOST} \
# -e VIRTUAL_PORT=8888 \
# -e LETSENCRYPT_HOST=${LETSENCRYPT_HOST} \
# -e LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL} \
# -e GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID} \
# -e GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET} \
# -e BASE_URL=${BASE_URL} \
# ${CONTAINER_NAME}

0 comments on commit 3d25153

Please sign in to comment.