mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-07 23:06:42 +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
|
- redis
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:13.1
|
image: postgres:13.2-alpine
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=postgres
|
- POSTGRES_PASSWORD=postgres
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -55,7 +55,7 @@ services:
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
image: elasticsearch:7.9.3
|
image: elasticsearch:7.9.3
|
||||||
volumes:
|
volumes:
|
||||||
- elastic_data:/var/lib/elasticsearch
|
- elastic_data:/usr/share/elasticsearch/data
|
||||||
logging:
|
logging:
|
||||||
driver: "none"
|
driver: "none"
|
||||||
environment:
|
environment:
|
||||||
|
@ -66,7 +66,7 @@ services:
|
||||||
hard: 65536
|
hard: 65536
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:6.0.10
|
image: redis:6.2.1-alpine
|
||||||
logging:
|
logging:
|
||||||
driver: "none"
|
driver: "none"
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,19 @@
|
||||||
FROM elixir:1.11.3
|
FROM elixir:1.11.4-alpine
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
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 \
|
||||||
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 \
|
|
||||||
&& mix local.hex --force \
|
&& mix local.hex --force \
|
||||||
&& mix local.rebar --force
|
&& mix local.rebar --force
|
||||||
|
|
||||||
ADD https://api.github.com/repos/philomena-dev/cli_intensities/git/refs/heads/master /tmp/cli_intensities_version.json
|
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 \
|
RUN git clone https://github.com/philomena-dev/cli_intensities /tmp/cli_intensities \
|
||||||
&& cd /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
|
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 \
|
RUN git clone https://github.com/philomena-dev/mediatools /tmp/mediatools \
|
||||||
&& cd /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-development /usr/local/bin/run-development
|
||||||
COPY docker/app/run-test /usr/local/bin/run-test
|
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.
|
# Run your custom purge command here.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
background() {
|
background() {
|
||||||
while :; do
|
while :; do
|
||||||
|
@ -32,10 +32,7 @@ done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Try to create the database if it doesn't exist yet
|
# Try to create the database if it doesn't exist yet
|
||||||
createdb -h postgres -U postgres philomena_dev && mix ecto.setup_dev
|
createdb -h postgres -U postgres philomena_dev && mix ecto.setup_dev && mix reindex_all
|
||||||
|
|
||||||
# Reindex
|
|
||||||
mix reindex_all
|
|
||||||
|
|
||||||
# Run background jobs
|
# Run background jobs
|
||||||
background &
|
background &
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
export MIX_ENV=test
|
export MIX_ENV=test
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env sh
|
||||||
rsvg-convert < "$1" -o "$2"
|
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
|
ENV APP_DIR /srv/philomena
|
||||||
COPY docker/web/nginx.conf /tmp/docker.nginx
|
COPY docker/web/nginx.conf /tmp/docker.nginx
|
||||||
RUN envsubst '$APP_DIR' < /tmp/docker.nginx > /etc/nginx/conf.d/default.conf
|
RUN envsubst '$APP_DIR' < /tmp/docker.nginx > /etc/nginx/conf.d/default.conf
|
||||||
|
|
Loading…
Reference in a new issue