Skip to content

Instantly share code, notes, and snippets.

@nakanod
Last active April 11, 2020 15:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakanod/1b89d6c20588c8fa0903e2a1372bf7f0 to your computer and use it in GitHub Desktop.
Save nakanod/1b89d6c20588c8fa0903e2a1372bf7f0 to your computer and use it in GitHub Desktop.
Pleroma docker files
HOST=pleroma.example.com
SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.git
_build
deps
uploads
use Mix.Config
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "pleroma_dev",
hostname: "localhost",
pool_size: 10
config :pleroma, Pleroma.Web.Endpoint,
url: [host: System.get_env("HOST"), scheme: "https", port: 443],
secret_key_base: System.get_env("SECRET_KEY_BASE")
config :pleroma, :instance,
name: "pleroma.example.com",
registrations_open: false
version: '3'
services:
app:
build: .
restart: always
image: nakanod/pleroma
environment:
- MIX_ENV=dev
env_file:
- ./.docker.env
network_mode: host
ports:
- "4000:4000"
volumes:
- /var/lib/pleroma/uploads:/app/uploads
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "4"
FROM elixir:1.5.2-slim
EXPOSE 4000
WORKDIR /app
RUN apt-get -y update && \
apt-get -y install git openssl && \
mix local.hex --force && \
mix local.rebar --force && \
rm -rf /var/lib/apt/lists/*
COPY ./mix.exs /app
COPY ./mix.lock /app
RUN mix deps.get --force
COPY ./config /app/config
COPY ./lib /app/lib
COPY ./priv /app/priv
COPY ./test /app/test
RUN apt-get -y update && \
apt-get -y install build-essential && \
mix deps.compile --force && \
apt-get -y purge --auto-remove build-essential && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/.tmp*
CMD ["mix", "phx.server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment