Commit f044003d authored by nanahira's avatar nanahira

exclude git from repo

parent e13adce0
Dockerfile
.dockerignore
#.git*
.git*
/LICENSE
/README.md
/config.example.json
......@@ -2,11 +2,12 @@ FROM debian:buster-slim as git-fetcher
RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y git && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
mkdir /taiko-web
COPY . /taiko-web
COPY .git /taiko-web/.git
WORKDIR /taiko-web
RUN git log -1 --pretty="format:{\"commit\": \"%H\", \"commit_short\": \"%h\", \"version\": \"\${TAIKO_VERSION}\", \"url\": \"\${TAIKO_GIT_URL}\"}" > ./version-template.json
RUN git log -1 --pretty="format:{\"commit\": \"%H\", \"commit_short\": \"%h\", \"version\": \"\TAIKO_VERSION\", \"url\": \"\TAIKO_GIT_URL\"}" > ./version-template.json
FROM node:buster-slim
......@@ -15,11 +16,12 @@ FROM node:buster-slim
#dependencies
RUN apt update && \
env DEBIAN_FRONTEND=noninteractive apt install -y python2.7 python-virtualenv python3.5 python3-virtualenv ffmpeg nginx gettext-base && \
env DEBIAN_FRONTEND=noninteractive apt install -y python2.7 python-virtualenv python3.5 python3-virtualenv ffmpeg nginx && \
rm -rf /var/lib/apt/lists/* && \
npm install -g pm2
COPY --from=git-fetcher /taiko-web /taiko-web
COPY . /taiko-web
COPY --from=git-fetcher /taiko-web/version-template.json /taiko-web/version-template.json
WORKDIR /taiko-web
# envs
......
......@@ -6,6 +6,6 @@ if [ -z $TAIKO_ASSETS_URL ]; then
export TAIKO_ASSETS_URL=$TAIKO_URL/assets/
fi
echo "{\"songs_baseurl\":\"$TAIKO_SONGS_URL\",\"assets_baseurl\":\"$TAIKO_ASSETS_URL\",\"multiplayer_baseurl\":\"$TAIKO_MULTIPLAYER_URL\",\"email\":\"$TAIKO_EMAIL\",\"redis_host\":\"$TAIKO_REDIS_HOST\",\"redis_port\":$TAIKO_REDIS_PORT,\"redis_password\":\"$TAIKO_REDIS_PASSWORD\",\"redis_db\":$TAIKO_REDIS_DB,\"git_url\":\"$TAIKO_GIT_URL\"}" | tee ./config.json
envsubst < version-template.json | tee version.json
sed "s#TAIKO_GIT_URL#$TAIKO_GIT_URL#g;s#TAIKO_VERSION#$TAIKO_VERSION#g" version-template.json | tee version.json
pm2-docker start ./docker/pm2-docker.json
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment