Added backend Makefile
This commit is contained in:
parent
3cf2a580c4
commit
420ef6f984
|
@ -24,10 +24,10 @@ steps:
|
|||
commands:
|
||||
- pgsanity docker/backend/db/**/*.sql
|
||||
- name: documentation
|
||||
image: crystal-lang/crystal:latest-alpine
|
||||
image: crystallang/crystal:latest-alpine
|
||||
commands:
|
||||
- cd docker/backend/
|
||||
- crystal docs
|
||||
- make docs
|
||||
- name: build
|
||||
image: tmaier/docker-compose
|
||||
volumes:
|
||||
|
|
|
@ -4,4 +4,4 @@ A fullstack application for assigning mentors to students based on their whishes
|
|||
|
||||
# Documentation
|
||||
|
||||
To build the documentation, run `crystal docs` in `docker/backend/`.
|
||||
To build the documentation, run `make docs` in `docker/backend/`.
|
||||
|
|
|
@ -9,12 +9,13 @@ ARG BUILD_ENV
|
|||
WORKDIR /app/backend
|
||||
COPY --from=deps /app/shard.yml /app/shard.lock ./
|
||||
COPY --from=deps /app/lib ./lib
|
||||
COPY ./Makefile ./Makefile
|
||||
COPY ./LICENSE ./LICENSE
|
||||
COPY ./src ./src
|
||||
RUN if [ "${BUILD_ENV}" = "development" ]; then \
|
||||
time shards build -Ddevelopment --static --verbose -s -p -t; \
|
||||
make dev; \
|
||||
else \
|
||||
time shards build --static --release --no-debug --verbose -s -p -t; \
|
||||
make; \
|
||||
fi
|
||||
|
||||
FROM alpine as runner
|
||||
|
|
12
docker/backend/Makefile
Normal file
12
docker/backend/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
.PHONY: all dev prod docs
|
||||
|
||||
all: prod
|
||||
|
||||
dev:
|
||||
shards build -Ddevelopment --static --verbose -s -p -t
|
||||
|
||||
prod:
|
||||
shards build --static --release --no-debug --verbose -s -p -t
|
||||
|
||||
docs:
|
||||
crystal docs --project-name "Mentorenwahl Backend"
|
Loading…
Reference in a new issue