akloeckner
6595011075
So, here we go with a PR for the nightly images. **They will need to have a nightly (at least) run of the pipeline.** I have also included a script and modifications to `drone.yml`, which I believe should serve well as a check-for-changes. But I have no way to check this in your drone environment. ~~And I have not (yet) checked it locally, either. I just copied things over from my GitHub setup.~~ (Update: The script works for me locally.) Could you have a look and let me know, what needs to be changed from your point of view? (I don't know Gitea too well... If there's an option to let you write into this feature branch, I'll enable it.) fixes #4 Co-authored-by: dev-docker <akloeckner@users.noreply.github.com> Co-authored-by: Florian Brinker <mail+gitlab@f-brinker.de> Reviewed-on: fbrinker/docker-tileboard#5 Co-authored-by: akloeckner <akloeckner@noreply.example.org> Co-committed-by: akloeckner <akloeckner@noreply.example.org>
34 lines
761 B
Docker
34 lines
761 B
Docker
## DEVELOPMENT IMAGE
|
|
FROM node:15-alpine AS dev
|
|
|
|
# Install pre-requisites
|
|
RUN apk add --no-cache git python3
|
|
|
|
# Fetch and build tileboard master branch
|
|
RUN mkdir /tileboard-source \
|
|
&& cd /tileboard-source/ \
|
|
&& git clone https://github.com/resoai/TileBoard . \
|
|
&& git checkout -b my-patch origin/master \
|
|
&& mkdir /tileboard \
|
|
&& ln -s /tileboard build \
|
|
&& yarn install \
|
|
&& yarn run build
|
|
|
|
# Start Server
|
|
WORKDIR /tileboard
|
|
EXPOSE 8000
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/bin/sh", "-c", "yarn --cwd /tileboard-source run dev & python3 -m http.server"]
|
|
|
|
|
|
|
|
## NIGHTLY BUILD IMAGE
|
|
FROM python:alpine AS nightly
|
|
|
|
# Copy contents from dev image
|
|
COPY --from=dev /tileboard /tileboard
|
|
|
|
# Start Server
|
|
WORKDIR /tileboard
|
|
EXPOSE 8000
|
|
ENTRYPOINT python3 -m http.server |