Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matrix-media-repo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
matrix-media-repo
Commits
c564b971
Commit
c564b971
authored
3 years ago
by
Travis Ralston
Browse files
Options
Downloads
Patches
Plain Diff
Update dev environment
parent
c8645eae
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
README.md
+13
-0
13 additions, 0 deletions
README.md
dev/Conduit.Dockerfile
+0
-30
0 additions, 30 deletions
dev/Conduit.Dockerfile
dev/docker-compose.yaml
+16
-4
16 additions, 4 deletions
dev/docker-compose.yaml
with
30 additions
and
34 deletions
.gitignore
+
1
−
0
View file @
c564b971
...
...
@@ -8,6 +8,7 @@
/gdpr-data
/ipfs
/dev/conduit-db
/dev/psql
# Generated files
assets.bin.go
...
...
This diff is collapsed.
Click to expand it.
README.md
+
13
−
0
View file @
c564b971
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
dev/Conduit.Dockerfile
deleted
100644 → 0
+
0
−
30
View file @
c8645eae
# 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"]
This diff is collapsed.
Click to expand it.
dev/docker-compose.yaml
+
16
−
4
View file @
c564b971
...
...
@@ -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/
rio
t-web:latest"
image
:
"
vectorim/
elemen
t-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
:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment