mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-11 19:58:28 +01:00
Build/push runtime image using Github Actions
This commit is contained in:
parent
dcc4ec7213
commit
6afbf09892
4
.github/workflows/runtime.yml
vendored
4
.github/workflows/runtime.yml
vendored
@ -20,8 +20,8 @@ jobs:
|
||||
|
||||
- name: Push to Docker Hub
|
||||
run: |
|
||||
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login --username snoyberg --password-stdin
|
||||
IMAGE_ID=snoyberg/snoyman.com
|
||||
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login --username fpcojenkins --password-stdin
|
||||
IMAGE_ID=fpco/stackage-server-prod
|
||||
docker tag image $IMAGE_ID
|
||||
docker push $IMAGE_ID
|
||||
IMAGE_ID=$IMAGE_ID:$GITHUB_SHA
|
||||
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM docker.pkg.github.com/fpco/stackage-server/base-build:dcc4ec7213daed35b27629b894c06a9769b9acff as build-app
|
||||
|
||||
RUN mkdir -p /artifacts/bin
|
||||
COPY . /src
|
||||
RUN stack install --stack-yaml /src/stack.yaml --local-bin-path /artifacts/bin
|
||||
|
||||
FROM docker.pkg.github.com/fpco/stackage-server/base-run:dcc4ec7213daed35b27629b894c06a9769b9acff
|
||||
|
||||
COPY --from=build-app /src/config/ /app/config/
|
||||
COPY --from=build-app /src/static/ /app/static/
|
||||
COPY --from=build-app /artifacts/bin/stackage-server /usr/local/bin/stackage-server
|
||||
COPY --from=build-app /artifacts/bin/stackage-server-cron /usr/local/bin/stackage-server-cron
|
||||
1
etc/docker/.gitignore
vendored
1
etc/docker/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/_artifacts/
|
||||
@ -1,12 +0,0 @@
|
||||
#fpco/stack-run:lts-5
|
||||
FROM fpco/stack-run@sha256:4b170ac899755a89c0295b7726c5530015211055125f6e3f6c5b902cb3e9b74b
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
wget -qO- https://get.haskellstack.org/ | sh -x && \
|
||||
unset DEBIAN_FRONTEND
|
||||
|
||||
COPY _artifacts/config/ /app/config/
|
||||
COPY _artifacts/static/ /app/static/
|
||||
COPY _artifacts/stackage-server /usr/local/bin/stackage-server
|
||||
COPY _artifacts/stackage-server-cron /usr/local/bin/stackage-server-cron
|
||||
Loading…
Reference in New Issue
Block a user