aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml42
-rw-r--r--Dockerfile19
-rw-r--r--reploy.cabal2
3 files changed, 62 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..1097787
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,42 @@
+
+image: docker:19.03.0
+
+variables:
+ # When using dind service, we need to instruct docker, to talk with
+ # the daemon started inside of the service. The daemon is available
+ # with a network connection instead of the default
+ # /var/run/docker.sock socket. docker:19.03.1 does this automatically
+ # by setting the DOCKER_HOST in
+ # https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03.1/docker-entrypoint.sh#L23-L29
+ #
+ # The 'docker' hostname is the alias of the service container as described at
+ # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services.
+ #
+ # Note that if you're using the Kubernetes executor, the variable
+ # should be set to tcp://localhost:2376/ because of how the
+ # Kubernetes executor connects services to the job container
+ #DOCKER_HOST: tcp://localhost:2376/
+ #
+ # When using dind, it's wise to use the overlayfs driver for
+ # improved performance.
+ DOCKER_DRIVER: overlay2
+ # Specify to Docker where to create the certificates, Docker will
+ # create them automatically on boot, and will create
+ # `/certs/client` that will be shared between the service and job
+ # container, thanks to volume mount from config.toml
+ DOCKER_TLS_CERTDIR: ""
+
+services:
+ - name: docker:19.03.0-dind
+ command: ["--mtu=1458"]
+
+build_image:
+ before_script:
+ - echo -n $DOCKER_AUTH_TOKEN | docker login -u exaexa --password-stdin $CI_REGISTRY
+ script:
+ - docker build -t $CI_REGISTRY_IMAGE .
+ - docker push $CI_REGISTRY_IMAGE
+ tags:
+ - privileged
+ artifacts:
+ expire_in: 1 week
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d43c43e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,19 @@
+
+FROM haskell:9.4
+
+WORKDIR /opt/reploy
+
+COPY reploy.cabal cabal.project /opt/reploy/
+COPY mustache/ /opt/reploy/mustache/
+
+RUN cabal update
+RUN cabal build --only-dependencies
+
+COPY *.hs README.md /opt/reploy/
+RUN cabal install
+
+WORKDIR /data
+COPY assets /data/assets/
+COPY templates /data/templates/
+COPY cards /data/cards/
+ENTRYPOINT ["cabal", "run", "site", "--"]
diff --git a/reploy.cabal b/reploy.cabal
index 1d16ed2..dd361a9 100644
--- a/reploy.cabal
+++ b/reploy.cabal
@@ -1,4 +1,4 @@
-name: pagedeploy
+name: reploy
version: 0.1.0.0
build-type: Simple
cabal-version: >= 1.10