mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-31 19:36:44 +01:00
use alpine docker dependencies, persist elasticsearch for faster dev iteration
This commit is contained in:
parent
3d9780700f
commit
2e49266549
7 changed files with 14 additions and 26 deletions
|
@ -44,7 +44,7 @@ services:
|
|||
- redis
|
||||
|
||||
postgres:
|
||||
image: postgres:13.1
|
||||
image: postgres:13.2-alpine
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
volumes:
|
||||
|
@ -55,7 +55,7 @@ services:
|
|||
elasticsearch:
|
||||
image: elasticsearch:7.9.3
|
||||
volumes:
|
||||
- elastic_data:/var/lib/elasticsearch
|
||||
- elastic_data:/usr/share/elasticsearch/data
|
||||
logging:
|
||||
driver: "none"
|
||||
environment:
|
||||
|
@ -66,7 +66,7 @@ services:
|
|||
hard: 65536
|
||||
|
||||
redis:
|
||||
image: redis:6.0.10
|
||||
image: redis:6.2.1-alpine
|
||||
logging:
|
||||
driver: "none"
|
||||
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
FROM elixir:1.11.3
|
||||
FROM elixir:1.11.4-alpine
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -qq -y install apt-transport-https wget gnupg \
|
||||
&& echo "deb https://deb.nodesource.com/node_12.x buster main" >> /etc/apt/sources.list \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" >> /etc/apt/sources.list \
|
||||
&& wget -qO - "https://www.postgresql.org/media/keys/ACCC4CF8.asc" | apt-key add - \
|
||||
&& wget -qO - "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get -qq -y dist-upgrade \
|
||||
&& apt-get -qq -y install inotify-tools postgresql-client build-essential git ffmpeg libavformat-dev libavcodec-dev libswscale-dev nodejs libmagic-dev libpng-dev gifsicle optipng libjpeg-progs librsvg2-bin imagemagick \
|
||||
RUN apk update \
|
||||
&& apk add inotify-tools build-base git ffmpeg ffmpeg-dev npm nodejs file-dev libpng-dev gifsicle optipng libjpeg-turbo-utils librsvg imagemagick postgresql-client wget \
|
||||
&& mix local.hex --force \
|
||||
&& mix local.rebar --force
|
||||
|
||||
ADD https://api.github.com/repos/philomena-dev/cli_intensities/git/refs/heads/master /tmp/cli_intensities_version.json
|
||||
RUN git clone https://github.com/philomena-dev/cli_intensities /tmp/cli_intensities \
|
||||
&& cd /tmp/cli_intensities \
|
||||
&& make install
|
||||
&& make -j$(nproc) install
|
||||
|
||||
ADD https://api.github.com/repos/philomena-dev/mediatools/git/refs/heads/master /tmp/mediatools_version.json
|
||||
RUN git clone https://github.com/philomena-dev/mediatools /tmp/mediatools \
|
||||
&& cd /tmp/mediatools \
|
||||
&& make install
|
||||
&& make -j$(nproc) install
|
||||
|
||||
COPY docker/app/run-development /usr/local/bin/run-development
|
||||
COPY docker/app/run-test /usr/local/bin/run-test
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Run your custom purge command here.
|
||||
#
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
background() {
|
||||
while :; do
|
||||
|
@ -32,10 +32,7 @@ done
|
|||
echo
|
||||
|
||||
# Try to create the database if it doesn't exist yet
|
||||
createdb -h postgres -U postgres philomena_dev && mix ecto.setup_dev
|
||||
|
||||
# Reindex
|
||||
mix reindex_all
|
||||
createdb -h postgres -U postgres philomena_dev && mix ecto.setup_dev && mix reindex_all
|
||||
|
||||
# Run background jobs
|
||||
background &
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
export MIX_ENV=test
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
rsvg-convert < "$1" -o "$2"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM nginx:1.19.6
|
||||
FROM nginx:1.19.10-alpine
|
||||
ENV APP_DIR /srv/philomena
|
||||
COPY docker/web/nginx.conf /tmp/docker.nginx
|
||||
RUN envsubst '$APP_DIR' < /tmp/docker.nginx > /etc/nginx/conf.d/default.conf
|
||||
|
|
Loading…
Reference in a new issue