File tree Expand file tree Collapse file tree 6 files changed +59
-0
lines changed
Expand file tree Collapse file tree 6 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:16.04
2+
3+ ENV DIRPATH /usr/local/etc
4+
5+ WORKDIR $DIRPATH
6+
7+ RUN apt-get update -y
8+ RUN apt-get install -y postgresql-client
9+
10+ COPY bin/realworld-exe /usr/local/bin/realworld-exe
11+ COPY postgresql $DIRPATH/postgresql
12+ COPY secrets $DIRPATH/secrets
13+
14+ ENTRYPOINT [ "realworld-exe" ]
Original file line number Diff line number Diff line change 1+ # !make
2+ include docker.env
3+ export $(shell sed 's/=.*//' docker.env)
4+
5+ $(PROJECT_BIN_DIR ) /$(PROJECT_BIN ) :
6+ stack build --local-bin-path $(PROJECT_BIN_DIR ) --copy-bins
7+
8+ build : $(PROJECT_BIN_DIR ) /$(PROJECT_BIN )
9+ .PHONY : build
10+
11+ docker-build :
12+ docker-compose run --rm builder $(SRC_DIR ) /docker-builder.sh
13+
14+ image :
15+ docker build -t $(IMAGE_NAME ) :$(IMAGE_VERSION ) .
16+ docker tag $(IMAGE_NAME ) :$(IMAGE_VERSION ) $(IMAGE_NAME ) :latest
17+
18+ clean :
19+ rm -f $(PROJECT_BIN_DIR ) /* || true
20+ rm * .cabal # remove hpack generated cabal file
21+ stack clean
Original file line number Diff line number Diff line change 1+ *
2+ * /
3+ ! .gitignore
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ apt-get update -y
4+ sudo apt-get install -y postgresql postgresql-contrib
5+
6+ cd $SRC_DIR
7+
8+ make build
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ builder :
4+ image : ' fpco/stack-build:lts-11.10'
5+ volumes :
6+ - ./:/usr/local/src:rw
7+ env_file :
8+ - docker.env
Original file line number Diff line number Diff line change 1+ SRC_DIR = /usr/local/src
2+ PROJECT_BIN_DIR = bin
3+ PROJECT_BIN = realworld-exe
4+ IMAGE_VERSION = 1
5+ IMAGE_NAME = haskell-scotty-realworld-example-app
You can’t perform that action at this time.
0 commit comments