Update build environment to crystal 0.33

This commit is contained in:
Anton Vakhrushev 2020-03-14 20:52:04 +03:00
parent b1331aa8c2
commit f1f3bf63c0
7 changed files with 21 additions and 69 deletions

View File

@ -67,18 +67,18 @@ workflows:
version: 2
test_and_build:
jobs:
# - build_server
# - build_assets
# - build_docker_image:
# requires:
# - build_server
# - build_assets
# filters:
# branches:
# only: master
- deploy_app:
# requires:
# - build_docker_image
- build_server
- build_assets
- build_docker_image:
requires:
- build_server
- build_assets
filters:
branches:
only: master
- deploy_app:
requires:
- build_docker_image
filters:
branches:
only: master

View File

@ -12,6 +12,9 @@ build-docker:
install-shards:
shards install
update-shards:
shards update
.PHONY: install
install: build-docker install-shards install-assets build-assets

View File

@ -1,6 +1 @@
FROM alpine:3.10.3 as builder
COPY ./docker/provide-crystal-alpine /opt/provision/provide-crystal-alpine
# Install crystal and dev libs
RUN /opt/provision/provide-crystal-alpine
FROM crystallang/crystal:0.33.0-alpine

View File

@ -1,34 +0,0 @@
#!/usr/bin/env sh
set -eux
source /home/dayoff/.env
IMAGE=cr.yandex/crplfk0168i4o8kd7ade/dayoff
DATA_PATH=/home/dayoff/data
CONTAINER_NAME="${CONTAINER_PREFIX}-server"
mkdir -p "$DATA_PATH"
TTY=
if [ -t 1 ] ; then
TTY=-t
fi
cat /home/dayoff/yandex_cloud_docker_registry_key.json | docker login --username json_key --password-stdin cr.yandex
docker pull "${IMAGE}"
docker stop "${CONTAINER_NAME}" || true
docker rm "${CONTAINER_NAME}" || true
docker run $TTY \
--init \
--detach \
--name "${CONTAINER_NAME}" \
--restart=unless-stopped \
-u "$(id -u):$(id -g)" \
-p "$WEB_SERVER_PORT:3000" \
-v "$DATA_PATH:/opt/dayoff" \
$IMAGE

View File

@ -1,12 +0,0 @@
#!/usr/bin/env sh
# Install crystal and dev libs
apk add -u \
make \
crystal \
shards \
tzdata \
libc-dev \
zlib-dev \
libressl-dev \
yaml-dev

View File

@ -2,15 +2,15 @@ version: 1.0
shards:
ameba:
github: crystal-ameba/ameba
version: 0.10.1
version: 0.11.0
exception_page:
github: crystal-loot/exception_page
version: 0.1.2
version: 0.1.4
kemal:
github: kemalcr/kemal
version: 0.25.2
version: 0.26.1
kilt:
github: jeromegn/kilt

View File

@ -15,9 +15,9 @@ license: MIT
dependencies:
kemal:
github: kemalcr/kemal
version: ~> 0.25.2
version: ~> 0.26.1
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 0.10.1
version: ~> 0.11.0