Added sql syntax checking and updated crystal version
This commit is contained in:
parent
ec650c6ebb
commit
426ba79506
|
@ -4,6 +4,13 @@ type: docker
|
|||
name: default
|
||||
|
||||
steps:
|
||||
- name: sql
|
||||
image: python:alpine
|
||||
commands:
|
||||
- apk add libecpg-dev --no-cache
|
||||
- pip3 install pgsanity
|
||||
- cd docker/backend/
|
||||
- find -name "*.sql" | xargs pgsanity
|
||||
- name: backend
|
||||
image: docker:dind
|
||||
volumes:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
services:
|
||||
nginx:
|
||||
container_name: nginx
|
||||
image: nginx:1.20.2-alpine
|
||||
image: nginx:alpine
|
||||
volumes:
|
||||
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
ports:
|
||||
|
@ -10,7 +10,7 @@ services:
|
|||
- backend
|
||||
|
||||
db:
|
||||
image: postgres:alpine3.15
|
||||
image: postgres:alpine
|
||||
container_name: db
|
||||
env_file: .env
|
||||
environment:
|
||||
|
@ -20,7 +20,7 @@ services:
|
|||
- db:/var/lib/postgresql/data
|
||||
|
||||
adminer:
|
||||
image: adminer:4.8.1-standalone
|
||||
image: adminer:standalone
|
||||
container_name: adminer
|
||||
depends_on:
|
||||
- db
|
||||
|
@ -40,4 +40,4 @@ services:
|
|||
- db
|
||||
|
||||
volumes:
|
||||
db:
|
||||
db: null
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
FROM python:alpine3.15 as pgsanity
|
||||
WORKDIR /app
|
||||
RUN apk add libecpg-dev --no-cache
|
||||
RUN pip3 install pgsanity
|
||||
COPY ./db ./db
|
||||
RUN find -name "*.sql" | xargs pgsanity
|
||||
# FROM python:alpine3.15 as pgsanity
|
||||
# WORKDIR /app
|
||||
# RUN apk add libecpg-dev --no-cache
|
||||
# RUN pip3 install pgsanity
|
||||
# COPY ./db ./db
|
||||
# RUN find -name "*.sql" | xargs pgsanity
|
||||
|
||||
FROM crystallang/crystal:1.2.2-alpine as micrate-deps
|
||||
FROM crystallang/crystal:latest-alpine as micrate-deps
|
||||
WORKDIR /app
|
||||
COPY ./micrate/shard.yml ./micrate/shard.lock ./
|
||||
RUN shards install --production
|
||||
|
||||
FROM crystallang/crystal:1.2.2-alpine as micrate-builder
|
||||
FROM crystallang/crystal:latest-alpine as micrate-builder
|
||||
ARG BUILD_ENV
|
||||
WORKDIR /app
|
||||
COPY --from=micrate-deps /app/shard.yml /app/shard.lock ./
|
||||
|
@ -19,13 +19,13 @@ COPY ./micrate/src ./src
|
|||
COPY ./scripts ./scripts
|
||||
RUN . ./scripts/build.sh ${BUILD_ENV}
|
||||
|
||||
FROM crystallang/crystal:1.2.2-alpine as deps
|
||||
FROM crystallang/crystal:latest-alpine as deps
|
||||
WORKDIR /app
|
||||
RUN apk add curl --no-cache
|
||||
COPY ./shard.yml ./shard.lock ./
|
||||
RUN shards install
|
||||
|
||||
FROM crystallang/crystal:1.2.2-alpine as builder
|
||||
FROM crystallang/crystal:latest-alpine as builder
|
||||
ARG BUILD_ENV
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/shard.yml /app/shard.lock ./
|
||||
|
@ -39,6 +39,7 @@ RUN . ./scripts/build.sh ${BUILD_ENV}
|
|||
FROM scratch as runner
|
||||
COPY --from=micrate-builder /app/bin/micrate .
|
||||
COPY --from=builder /app/bin/mw .
|
||||
COPY --from=pgsanity /app/db ./db
|
||||
# COPY --from=pgsanity /app/db ./db
|
||||
COPY ./db ./db
|
||||
EXPOSE 8080
|
||||
CMD [ "/mw" ]
|
||||
|
|
|
@ -8,7 +8,7 @@ targets:
|
|||
mw:
|
||||
main: src/app.cr
|
||||
|
||||
crystal: 1.2.2
|
||||
crystal: 1.3.0
|
||||
|
||||
dependencies:
|
||||
granite:
|
||||
|
|
Loading…
Reference in a new issue