some tests

This commit is contained in:
Inex Code 2021-01-17 12:47:23 +03:00
parent 2e87b53024
commit e127ac3596
4 changed files with 42 additions and 5 deletions

View file

@ -12,7 +12,7 @@ RUN mix local.hex --force && \
mix local.rebar --force mix local.rebar --force
# set build ENV # set build ENV
ENV MIX_ENV=prod ENV MIX_ENV=dev
# install mix dependencies # install mix dependencies
COPY mix.exs ./ COPY mix.exs ./

View file

@ -19,7 +19,7 @@ config :backend, BackendWeb.Endpoint,
config :backend, Backend.Repo, queue_target: 5000 config :backend, Backend.Repo, queue_target: 5000
config :backend, Backend.Elasticsearch.Cluster, config :backend, Backend.Elasticsearch.Cluster,
url: "http://localhost:9200", url: "http://elastic:9200",
api: Elasticsearch.API.HTTP, api: Elasticsearch.API.HTTP,
json_library: Jason json_library: Jason
@ -35,7 +35,7 @@ config :gollum,
# 24 hrs # 24 hrs
refresh_secs: 86_400, refresh_secs: 86_400,
lazy_refresh: true, lazy_refresh: true,
user_agent: "fediverse.space crawler" user_agent: "fedi.inex.dev crawler"
config :backend, Graph.Cache, config :backend, Graph.Cache,
# 1 hour # 1 hour
@ -69,7 +69,7 @@ config :backend, :crawler,
# dummy instances used for pleroma CI # dummy instances used for pleroma CI
"pleroma.online" "pleroma.online"
], ],
user_agent: "fediverse.space crawler", user_agent: "fedi.inex.dev crawler",
require_bidirectional_mentions: false, require_bidirectional_mentions: false,
admin_phone: System.get_env("ADMIN_PHONE"), admin_phone: System.get_env("ADMIN_PHONE"),
twilio_phone: System.get_env("TWILIO_PHONE"), twilio_phone: System.get_env("TWILIO_PHONE"),

View file

@ -53,7 +53,7 @@ config :backend, Backend.Repo,
username: "postgres", username: "postgres",
password: "postgres", password: "postgres",
database: "backend_dev", database: "backend_dev",
hostname: "localhost", hostname: "db",
pool_size: 10 pool_size: 10
config :backend, :crawler, config :backend, :crawler,

View file

@ -0,0 +1,37 @@
version: "2"
networks:
space:
external: false
services:
server:
build: .
restart: unless-stopped
networks:
- space
volumes:
- /home/gitea/data:/data
depends_on:
- db
db:
image: postgres:12-alpine
restart: unless-stopped
environment:
- POSTGRES_PASSWORD: postgres
- POSTGRES_USER: postgres
networks:
- space
volumes:
- /var/lib/postgresql/data
elastic:
image: elasticsearch:6.8.9
restart: unless-stopped
environment:
- discovery.type: single-node
networks:
- space