diff --git a/.circleci/config.yml b/.circleci/config.yml index 12b95d9..4232632 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/Makefile b/Makefile index 18da933..8f04d63 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 9756736..3b4d6ef 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -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 diff --git a/docker/deploy-prod b/docker/deploy-prod deleted file mode 100755 index 0354063..0000000 --- a/docker/deploy-prod +++ /dev/null @@ -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 diff --git a/docker/provide-crystal-alpine b/docker/provide-crystal-alpine deleted file mode 100755 index 8b6d920..0000000 --- a/docker/provide-crystal-alpine +++ /dev/null @@ -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 diff --git a/shard.lock b/shard.lock index d02dd57..a50b3f8 100644 --- a/shard.lock +++ b/shard.lock @@ -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 diff --git a/shard.yml b/shard.yml index 148022c..89b866c 100644 --- a/shard.yml +++ b/shard.yml @@ -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