Commit c9e21b1c authored by Nicolas Lenz's avatar Nicolas Lenz

dockerize

parent 07647e3b
......@@ -19,4 +19,3 @@ cabal.sandbox.config
*.keter
*~
\#*
wms-server.cabal
image: fpco/stack-build:latest
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
cache:
paths:
- .stack-work
- .stack
build:
stage: build
image: fpco/stack-build:14.27
script:
- stack build
- cp $(stack path --dist-dir)/build/wms-server/wms-server .
......@@ -19,3 +15,19 @@ build:
- wms-server
- wms-server-ctl
- config
cache:
paths:
- .stack-work
- .stack
docker:
stage: build-image
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp wms-server docker/
- cp wms-server-ctl docker/
- cp -r config docker/
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/docker --dockerfile $CI_PROJECT_DIR/docker/dockerfile --destination $CI_REGISTRY_IMAGE:latest
FROM debian:latest
COPY wms-server .
COPY wms-server-ctl .
COPY config .
CMD ./wms-server
resolver: lts-14.21
resolver: lts-14.27
packages:
- .
......@@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
size: 524162
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/21.yaml
sha256: 9a55dd75853718f2bbbe951872b36a3b7802fcd71796e0f25b8664f24e34c666
original: lts-14.21
size: 524996
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml
sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0
original: lts-14.27
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.33.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: 60b15aa4f32d8402f49b7ebaa530e5151f54dcba818b51634f1e8b9bd9024c38
name: wms-server
version: 1.0.0
license: Apache-2.0
license-file: LICENSE
build-type: Simple
flag dev
description: Turn on development settings, like auto-reload templates.
manual: False
default: False
flag library-only
description: Build for use with "yesod devel"
manual: False
default: False
library
exposed-modules:
Application
Auth
Foundation
Handler.Container
Handler.Location
Handler.Misc
Import
Import.NoFoundation
Model
Settings
other-modules:
Paths_wms_server
hs-source-dirs:
src
build-depends:
aeson
, base
, bytestring
, case-insensitive
, classy-prelude
, classy-prelude-conduit
, classy-prelude-yesod
, conduit
, containers
, cryptonite
, data-default
, directory
, fast-logger
, file-embed
, foreign-store
, hjsmin
, http-client-tls
, http-conduit
, monad-control
, monad-logger
, persistent
, persistent-postgresql
, persistent-template
, safe
, shakespeare
, template-haskell
, text
, time
, unordered-containers
, vector
, wai
, wai-extra
, wai-logger
, warp
, yaml
, yesod
, yesod-core
, yesod-form
, yesod-static
if (flag(dev)) || (flag(library-only))
ghc-options: -Wall -fwarn-tabs -O0
cpp-options: -DDEVELOPMENT
else
ghc-options: -Wall -fwarn-tabs -O2
default-language: Haskell2010
executable wms-server
main-is: main.hs
other-modules:
DevelMain
Paths_wms_server
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base
, bytestring
, case-insensitive
, classy-prelude
, classy-prelude-conduit
, classy-prelude-yesod
, conduit
, containers
, cryptonite
, data-default
, directory
, fast-logger
, file-embed
, foreign-store
, hjsmin
, http-client-tls
, http-conduit
, monad-control
, monad-logger
, persistent
, persistent-postgresql
, persistent-template
, safe
, shakespeare
, template-haskell
, text
, time
, unordered-containers
, vector
, wai
, wai-extra
, wai-logger
, warp
, wms-server
, yaml
, yesod
, yesod-core
, yesod-form
, yesod-static
if flag(library-only)
buildable: False
default-language: Haskell2010
executable wms-server-ctl
main-is: Main.hs
other-modules:
Paths_wms_server
hs-source-dirs:
app-ctl
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson
, base
, bytestring
, case-insensitive
, classy-prelude
, classy-prelude-conduit
, classy-prelude-yesod
, conduit
, containers
, cryptonite
, data-default
, directory
, fast-logger
, file-embed
, foreign-store
, hjsmin
, http-client-tls
, http-conduit
, monad-control
, monad-logger
, persistent
, persistent-postgresql
, persistent-template
, safe
, shakespeare
, template-haskell
, text
, time
, unordered-containers
, vector
, wai
, wai-extra
, wai-logger
, warp
, wms-server
, yaml
, yesod
, yesod-core
, yesod-form
, yesod-static
if flag(library-only)
buildable: False
default-language: Haskell2010
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