diff options
-rw-r--r-- | .dockerignore | 7 | ||||
-rw-r--r-- | Dockerfile | 14 | ||||
-rw-r--r-- | Dockerfile.raw | 10 | ||||
-rw-r--r-- | arch/PKGBUILD | 39 | ||||
-rw-r--r-- | arch/tazblog@.service | 11 |
5 files changed, 15 insertions, 66 deletions
diff --git a/.dockerignore b/.dockerignore index b6d3d3e812c9..8ee1bf9489a3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1 @@ -dist -res -src -tools -arch/pkg -arch/src +.stack-work diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000000..098666934e27 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM fpco/stack-build +MAINTAINER Vincent Ambo <dev@tazj.in> + +# Base setup +VOLUME /var/tazblog +EXPOSE 8000 + +# Build blog +ADD . /opt/tazblog/src +WORKDIR /opt/tazblog/src +RUN stack build && cp .stack-work/ + +# Done! +CMD /usr/bin/tazblog diff --git a/Dockerfile.raw b/Dockerfile.raw deleted file mode 100644 index f67e3091dddc..000000000000 --- a/Dockerfile.raw +++ /dev/null @@ -1,10 +0,0 @@ -FROM base/archlinux -MAINTAINER Vincent Ambo <dev@tazj.in> - -COPY $ARCH_PKG /tmp/tazblog-current.pkg.tar.xz - -RUN pacman -U /tmp/tazblog-current.pkg.tar.xz --noconfirm - -VOLUME /var/tazblog -EXPOSE 8000 -CMD /usr/bin/tazblog diff --git a/arch/PKGBUILD b/arch/PKGBUILD deleted file mode 100644 index 02ff790fd729..000000000000 --- a/arch/PKGBUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Maintainer: Vincent Ambo <dev@tazj.in> -pkgname=tazblog -pkgver=4.2 -pkgrel=1 -pkgdesc="Tazjin's blog written in Haskell" -arch=('i686' 'x86_64') -url="http://tazj.in" -license=('MIT') -makedepends=('ghc' 'cabal-install') -source=('tazblog@.service') -sha1sums=('6aeb901a9d0e25763c9c99168a440dd5ac99ffc1') - -build() { - cd "$srcdir" - test -e blog-src || ln -fs ../../ blog-src - cd blog-src - - cabal sandbox init - cabal update - cabal install -j --only-dependencies - cabal build -} - -package() { - cd "$srcdir" - cd blog-src - - # Install blog itself - install -d "${pkgdir}/usr/bin" - install -m755 dist/build/tazblog/tazblog "${pkgdir}/usr/bin/tazblog" - - # Install resources - install -d "${pkgdir}/usr/share/tazblog" - cp -r res/ "${pkgdir}/usr/share/tazblog" - - # Install service file - install -d "${pkgdir}/usr/lib/systemd/system" - cp "arch/tazblog@.service" "${pkgdir}/usr/lib/systemd/system/" -} diff --git a/arch/tazblog@.service b/arch/tazblog@.service deleted file mode 100644 index 2b6f115eb510..000000000000 --- a/arch/tazblog@.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=tazblog web process - -[Service] -Type=simple -ExecStart=/usr/bin/tazblog -Restart=always -User=%i - -[Install] -WantedBy=multi-user.target |