Skip to content
Snippets Groups Projects
Commit c564b971 authored by Travis Ralston's avatar Travis Ralston
Browse files

Update dev environment

parent c8645eae
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@
/gdpr-data
/ipfs
/dev/conduit-db
/dev/psql
# Generated files
assets.bin.go
......
......@@ -40,6 +40,19 @@ csApi: "http://localhost:8008" # This is exposed by the nginx container
Federated media requests should function normally with this setup, though the homeserver itself will be unable to federate.
For convenience, an element-web instance is also hosted at the same port from the root.
A postgresql server is also created by the docker stack for ease of use. To use it, add the following to your configuration:
```yaml
database:
postgres: "postgres://postgres:test1234@127.0.0.1:5432/postgres?sslmode=disable"
pool:
maxConnections: 10
maxIdleConnections: 10
```
Note that the postgresql image is *insecure* and not recommended for production use. It also does not follow best practices
for database management - use at your own risk.
## Importing media from synapse
Media is imported by connecting to your synapse database and downloading all the content from the homeserver. This is so
......
# Note: this builds a minimal conduit image from the git repo. It has nothing to do with the media repo directly.
# This should not be used in production. It is adapted from the official version.
FROM alpine:3.12 as builder
RUN sed -i -e 's|v3\.12|edge|' /etc/apk/repositories
RUN apk add --no-cache cargo openssl-dev git
RUN git clone https://git.koesters.xyz/timo/conduit.git /conduit
WORKDIR /conduit
RUN cargo install --path .
# --- ---------------------- ---
FROM alpine:3.12
# Non-standard port
EXPOSE 8004
RUN mkdir -p /srv/conduit/.local/share/conduit
COPY --from=builder /root/.cargo/bin/conduit /srv/conduit/
RUN set -x ; \
addgroup -Sg 82 www-data 2>/dev/null ; \
adduser -S -D -H -h /srv/conduit -G www-data -g www-data www-data 2>/dev/null ; \
addgroup www-data www-data 2>/dev/null && exit 0 ; exit 1
RUN chown -cR www-data:www-data /srv/conduit
RUN apk add --no-cache ca-certificates libgcc
VOLUME ["/srv/conduit/.local/share/conduit"]
USER www-data
WORKDIR /src/conduit
ENTRYPOINT ["/srv/conduit/conduit"]
......@@ -2,9 +2,7 @@ version: '2.0'
services:
media_conduit:
container_name: "media_repo_conduit"
build:
context: '.'
dockerfile: 'Conduit.Dockerfile'
image: "matrixconduit/matrix-conduit:latest"
restart: unless-stopped
volumes:
- ./conduit-db:/srv/conduit/.local/share/conduit
......@@ -13,6 +11,7 @@ services:
ROCKET_PORT: 8004
ROCKET_REGISTRATION_DISABLED: "false"
ROCKET_ENCRYPTION_DISABLED: "false"
ROCKET_FEDERATION_ENABLED: "false"
networks:
- media_proxy
media_nginx:
......@@ -27,11 +26,24 @@ services:
- media_proxy
media_element:
container_name: "media_repo_element"
image: "vectorim/riot-web:latest"
image: "vectorim/element-web:latest"
restart: unless-stopped
volumes:
- ./element-config.json:/app/config.json
networks:
- media_proxy
media_psql:
container_name: "media_repo_psql"
image: "postgres"
restart: unless-stopped
volumes:
- ./psql:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "test1234"
PGDATA: "/var/lib/postgresql/data/pgdata"
ports:
- "5432:5432"
networks:
- media_proxy
networks:
media_proxy:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment