Last active
April 11, 2020 15:00
-
-
Save nakanod/1b89d6c20588c8fa0903e2a1372bf7f0 to your computer and use it in GitHub Desktop.
Pleroma docker files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOST=pleroma.example.com | |
SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.git | |
_build | |
deps | |
uploads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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