└── snap ├── local ├── wrappers │ ├── wrapper-ui │ ├── wrapper-iframely │ ├── wrapper-psql │ ├── wrapper-postgres │ ├── wrapper-pictrs │ ├── wrapper-pg_ctl │ ├── wrapper-lemmy │ ├── wrapper-nginx │ └── wrapper-initialize └── conf │ └── nginx.conf ├── hooks ├── install └── configure └── snapcraft.yaml /snap/local/wrappers/wrapper-ui: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eux 3 | cd "$SNAP"/ui 4 | "$SNAP"/bin/node "$SNAP"/ui/dist/js/server.js 5 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-iframely: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eux 3 | cd "$SNAP"/iframely 4 | $SNAP/bin/node "$SNAP"/iframely/server.js 5 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-psql: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | export PSQLRC="$SNAP_USER_COMMON/.psqlrc" 6 | 7 | "$SNAP"/usr/bin/psql "$@" 8 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-postgres: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | export I18NPATH=$SNAP/usr/share/i18n 6 | export LOCPATH=$SNAP_USER_DATA/locales 7 | export LANG="en_US.UTF-8" 8 | 9 | "$SNAP"/usr/bin/postgres "$@" 10 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-pictrs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio" 6 | 7 | RUST_LOG=debug "$SNAP"/bin/pict-rs --addr 0.0.0.0:1235 --path "$SNAP_DATA"/pictrs/ 8 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-pg_ctl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | export I18NPATH=$SNAP/usr/share/i18n 6 | export LOCPATH=$SNAP_USER_DATA/locales 7 | export LANG="en_US.UTF-8" 8 | 9 | $SNAP/usr/bin/setpriv --clear-groups --reuid snap_daemon --regid snap_daemon -- $SNAP/usr/bin/pg_ctl "$@" 10 | -------------------------------------------------------------------------------- /snap/hooks/install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | TOKEN="$(< /dev/urandom tr -cd "A-Za-z0-9" | head -c 40)" 4 | sed \ 5 | -e "s/null/localhost/g" \ 6 | -e "s/changeme/$TOKEN/g" \ 7 | -e "s|/app/documentation|$SNAP/documentation|g" \ 8 | -e 's|http://pictrs:8080|http://localhost:1235|g' \ 9 | -e 's|http://iframely|http://localhost:8061|g' \ 10 | -e 's/8536/8540/g' \ 11 | "$SNAP"/defaults.hjson \ 12 | > "$SNAP_DATA"/defaults.hjson 13 | 14 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-lemmy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | n=0 6 | until [ "$n" -ge 30 ]; do 7 | "$SNAP"/usr/bin/psql -U snap_daemon postgres -c "SELECT * FROM pg_user;" > /dev/null && break 8 | n=$((n+1)) 9 | sleep 1 10 | done 11 | 12 | "$SNAP"/usr/bin/psql -U snap_daemon postgres -c "CREATE USER lemmy;" || true 13 | "$SNAP"/usr/bin/psql -U snap_daemon postgres -c "CREATE DATABASE lemmy;" || true 14 | "$SNAP"/usr/bin/psql -U snap_daemon postgres -c "GRANT ALL PRIVILEGES ON DATABASE lemmy TO lemmy;" || true 15 | 16 | export LEMMY_CONFIG_LOCATION="$LEMMY_CONFIG_LOCATION" 17 | 18 | "$SNAP"/bin/lemmy_server 19 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-nginx: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | # Ensure directories from `/snap` are copied over to 6 | # `/var/snap`, if they haven't already been. 7 | cd "$SNAP" 8 | for dir in conf html logs sbin; do 9 | [ -d "$SNAP_DATA"/$dir ] || { 10 | cp -rf $dir "$SNAP_DATA"/ 11 | chown -R snap_daemon "$SNAP_DATA"/$dir 12 | } 13 | done 14 | 15 | # Make temp directories under `/var/snap` 16 | cd "$SNAP_DATA" 17 | for dir in client_body fastcgi proxy scgi uwsgi; do 18 | [ -d ${dir}_temp ] || { 19 | mkdir -p ${dir}_temp 20 | chown snap_daemon ${dir}_temp 21 | } 22 | done 23 | 24 | "$SNAP"/usr/bin/setpriv --clear-groups --reuid snap_daemon --regid snap_daemon -- \ 25 | "$SNAP"/sbin/nginx -g 'daemon off;' -p "$SNAP_DATA" 26 | -------------------------------------------------------------------------------- /snap/local/wrappers/wrapper-initialize: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eux 4 | 5 | LOC="C.UTF-8" 6 | 7 | export LANGUAGE=C.UTF-8 8 | export LC_ALL=C.UTF-8 9 | export LANG=C.UTF-8 10 | export I18NPATH=$SNAP/usr/share/i18n 11 | export LOCPATH=$SNAP_USER_DATA/locales 12 | 13 | DATA_DIR="$SNAP_DATA/data" 14 | LOG_DIR="$SNAP_DATA/logs" 15 | PSQLHIST_DIR="$SNAP_DATA/history" 16 | 17 | [ -e "$LOCPATH" ] || mkdir "$LOCPATH" 18 | 19 | if [ ! -e $LOCPATH/$LOC ]; then 20 | echo "Generating a new locale in $LOCPATH/$LOC..." 21 | localedef --prefix=$LOCPATH -f UTF-8 -i en_US $LOCPATH/$LOC 22 | fi 23 | 24 | echo "Setting up PostgreSQL environment..." 25 | echo "Data directory: $DATA_DIR" 26 | [ -e "$DATA_DIR" ] || mkdir "$DATA_DIR" 27 | 28 | echo "Ensuring permissions are set correctly on $DATA_DIR" 29 | chown snap_daemon:snap_daemon -R $DATA_DIR || true 30 | 31 | echo "Logs directory: $LOG_DIR" 32 | [ -e "$LOG_DIR" ] || mkdir "$LOG_DIR" 33 | chown snap_daemon:snap_daemon -R $LOG_DIR || true 34 | 35 | echo "psql history directory: $PSQLHIST_DIR" 36 | [ -e "$PSQLHIST_DIR" ] || mkdir "$PSQLHIST_DIR" 37 | chown snap_daemon:snap_daemon -R $PSQLHIST_DIR || true 38 | 39 | echo ".psqlrc file: $SNAP_USER_COMMON/.psqlrc" 40 | [ -e "$SNAP_USER_COMMON/.psqlrc" ] || echo "\set HISTFILE $PSQLHIST_DIR/psql_history- :DBNAME" > $SNAP_USER_COMMON/.psqlrc 41 | 42 | echo "Checking if initdb has already been run before. If not, a new cluster will be created." 43 | $SNAP/usr/bin/setpriv --clear-groups --reuid snap_daemon --regid snap_daemon -- bash -c "[ -e '$DATA_DIR/base' ] || $SNAP/usr/bin/initdb -D $DATA_DIR" 44 | 45 | $SNAP/usr/bin/setpriv --clear-groups --reuid snap_daemon --regid snap_daemon -- $SNAP/usr/bin/postgres -D $DATA_DIR 46 | -------------------------------------------------------------------------------- /snap/local/conf/nginx.conf: -------------------------------------------------------------------------------- 1 | events { 2 | worker_connections 1024; 3 | } 4 | 5 | http { 6 | server { 7 | listen 8536; 8 | server_name localhost; 9 | access_log off; 10 | 11 | # Upload limit for pictshare 12 | client_max_body_size 50M; 13 | 14 | location /api/v1 { 15 | proxy_pass http://localhost:8540/api/v1; 16 | proxy_http_version 1.1; 17 | proxy_set_header Upgrade $http_upgrade; 18 | proxy_set_header Connection "upgrade"; 19 | proxy_set_header X-Real-IP $remote_addr; 20 | proxy_set_header Host $host; 21 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 22 | } 23 | 24 | location /pictrs { 25 | proxy_pass http://localhost:8540/pictrs; 26 | proxy_set_header X-Real-IP $remote_addr; 27 | proxy_set_header Host $host; 28 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 29 | } 30 | 31 | location /docs { 32 | proxy_pass http://localhost:8540/docs; 33 | proxy_set_header X-Real-IP $remote_addr; 34 | proxy_set_header Host $host; 35 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 36 | } 37 | 38 | location / { 39 | proxy_pass http://localhost:1234; 40 | proxy_set_header X-Real-IP $remote_addr; 41 | proxy_set_header Host $host; 42 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 43 | 44 | # Cuts off the trailing slash on URLs to make them valid 45 | rewrite ^(.+)/+$ $1 permanent; 46 | } 47 | 48 | location /iframely/ { 49 | proxy_pass http://localhost:8061/; 50 | proxy_set_header X-Real-IP $remote_addr; 51 | proxy_set_header Host $host; 52 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /snap/hooks/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Start config 4 | echo '{' > $SNAP_DATA/config.hjson 5 | 6 | # Set up top-level section 7 | for prop in hostname bind port tls_enabled jwt_secret docs_dir pictrs_url iframely_url 8 | do 9 | _prop=$(echo $prop | sed 's/_/-/') 10 | [ -n "$(snapctl get $_prop)" ] && echo " $prop: \"$(snapctl get $_prop)\"" >> $SNAP_DATA/config.hjson 11 | done 12 | 13 | # Set up initial setup section 14 | [ -n "$(snapctl get setup)" ] && { 15 | echo ' setup: {' >> $SNAP_DATA/config.hjson 16 | for prop in admin_username admin_password admin_email site_name 17 | do 18 | _prop=$(echo $prop | sed 's/_/-/') 19 | [ -n "$(snapctl get setup.$_prop)" ] && echo " $prop: \"$(snapctl get setup.$_prop)\"" >> $SNAP_DATA/config.hjson 20 | done 21 | echo ' }' >> $SNAP_DATA/config.hjson 22 | } 23 | 24 | # Set up database section 25 | [ -n "$(snapctl get database)" ] && { 26 | echo ' database: {' >> $SNAP_DATA/config.hjson 27 | for prop in user password host port database pool_size 28 | do 29 | _prop=$(echo $prop | sed 's/_/-/') 30 | [ -n "$(snapctl get database.$_prop)" ] && echo " $prop: \"$(snapctl get database.$_prop)\"" >> $SNAP_DATA/config.hjson 31 | done 32 | echo ' }' >> $SNAP_DATA/config.hjson 33 | } 34 | 35 | # Set up rate limit section 36 | [ -n "$(snapctl get rate-limit)" ] && { 37 | echo ' rate_limit: {' >> $SNAP_DATA/config.hjson 38 | for prop in message message_per_second post post_per_second register register_per_second image image_per_second 39 | do 40 | _prop=$(echo $prop | sed 's/_/-/') 41 | [ -n "$(snapctl get rate-limit.$_prop)" ] && echo " $prop: \"$(snapctl get rate-limit.$_prop)\"" >> $SNAP_DATA/config.hjson 42 | done 43 | echo ' }' >> $SNAP_DATA/config.hjson 44 | } 45 | 46 | # Set up federation section 47 | [ -n "$(snapctl get federation)" ] && { 48 | echo ' federation: {' >> $SNAP_DATA/config.hjson 49 | for prop in enabled allowed_instances blocked_instances 50 | do 51 | _prop=$(echo $prop | sed 's/_/-/') 52 | [ -n "$(snapctl get federation.$_prop)" ] && echo " $prop: \"$(snapctl get federation.$_prop)\"" >> $SNAP_DATA/config.hjson 53 | done 54 | echo ' }' >> $SNAP_DATA/config.hjson 55 | } 56 | 57 | # Set up captcha section 58 | [ -n "$(snapctl get captcha)" ] && { 59 | echo ' captcha: {' >> $SNAP_DATA/config.hjson 60 | for prop in enabled difficulty 61 | do 62 | _prop=$(echo $prop | sed 's/_/-/') 63 | [ -n "$(snapctl get captcha.$_prop)" ] && echo " $prop: \"$(snapctl get captcha.$_prop)\"" >> $SNAP_DATA/config.hjson 64 | done 65 | echo ' }' >> $SNAP_DATA/config.hjson 66 | } 67 | 68 | # Set up email section 69 | [ -n "$(snapctl get email)" ] && { 70 | echo ' email: {' >> $SNAP_DATA/config.hjson 71 | for prop in smtp_server smtp_login smtp_password smtp_from_address use_tls 72 | do 73 | _prop=$(echo $prop | sed 's/_/-/') 74 | [ -n "$(snapctl get email.$_prop)" ] && echo " $prop: \"$(snapctl get email.$_prop)\"" >> $SNAP_DATA/config.hjson 75 | done 76 | echo ' }' >> $SNAP_DATA/config.hjson 77 | } 78 | 79 | # End config 80 | echo '}' >> $SNAP_DATA/config.hjson 81 | 82 | snapctl restart ${SNAP_NAME}.lemmy 83 | -------------------------------------------------------------------------------- /snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: lemmy 2 | summary: A link aggregator / Reddit clone for the fediverse 3 | description: | 4 | Lemmy is similar to sites like Reddit, Lobste.rs, or Hacker News: you subscribe to forums you're 5 | interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it 6 | is very different; anyone can easily run a server, and all these servers are federated (think 7 | email), and connected to the same universe, called the Fediverse. 8 | 9 | https://github.com/LemmyNet/lemmy/ 10 | 11 | base: core20 12 | confinement: strict 13 | grade: devel 14 | adopt-info: server 15 | 16 | system-usernames: 17 | snap_daemon: shared 18 | 19 | parts: 20 | wrappers: 21 | plugin: dump 22 | source: snap/local/wrappers/ 23 | organize: 24 | wrapper-initialize: usr/bin/wrapper-initialize 25 | wrapper-pg_ctl: usr/bin/wrapper-pg_ctl 26 | wrapper-psql: usr/bin/wrapper-psql 27 | wrapper-postgres: usr/bin/wrapper-postgres 28 | wrapper-lemmy: usr/bin/wrapper-lemmy 29 | wrapper-nginx: usr/bin/wrapper-nginx 30 | wrapper-iframely: usr/bin/wrapper-iframely 31 | wrapper-ui: usr/bin/wrapper-ui 32 | wrapper-pictrs: usr/bin/wrapper-pictrs 33 | 34 | nginx: 35 | plugin: autotools 36 | source: https://github.com/nginx/nginx.git 37 | source-type: git 38 | override-build: | 39 | cp auto/configure . 40 | snapcraftctl build 41 | organize: 42 | usr/local/nginx/conf: conf 43 | usr/local/nginx/html: html 44 | usr/local/nginx/logs: logs 45 | usr/local/nginx/sbin: sbin 46 | filesets: 47 | conf: 48 | - conf 49 | - -conf/nginx.conf 50 | stage: 51 | - $conf 52 | - html 53 | - logs 54 | - sbin 55 | autotools-configure-parameters: 56 | - --error-log-path=logs/error.log 57 | - --http-log-path=logs/nginx.log 58 | build-packages: 59 | - libc6 60 | - libgd3 61 | - libgeoip1 62 | - libpcre3-dev 63 | - libssl1.1 64 | - libxml2 65 | - libxslt1.1 66 | - zlib1g 67 | 68 | nginx-conf: 69 | plugin: dump 70 | after: [nginx] 71 | source: snap/local/conf 72 | organize: 73 | nginx.conf: conf/nginx.conf 74 | stage: 75 | - conf/nginx.conf 76 | 77 | node: 78 | plugin: make 79 | source-type: tar 80 | source: https://nodejs.org/download/release/v14.13.1/node-v14.13.1.tar.gz 81 | build-packages: 82 | - g++ 83 | - make 84 | - python3-distutils 85 | override-build: | 86 | set -eux 87 | ./configure --prefix=/ --release-urlbase=https://nodejs.org/download/release/ --tag= 88 | snapcraftctl build 89 | mkdir -p $SNAPCRAFT_PART_INSTALL/etc 90 | echo "prefix = /usr/local" >> $SNAPCRAFT_PART_INSTALL/etc/npmrc 91 | 92 | yarn: 93 | source-type: tar 94 | source: https://yarnpkg.com/latest.tar.gz 95 | plugin: dump 96 | # Yarn has a problem with lifecycle scripts when used inside snap, they don't complete properly, with exit code !=0. 97 | # Replacing the spinner with proper stdio appears to fix it. 98 | override-build: | 99 | set -eux 100 | snapcraftctl build 101 | sed -i "s/var stdio = spinner ? undefined : 'inherit';/var stdio = 'inherit';/" $SNAPCRAFT_PART_INSTALL/lib/cli.js 102 | 103 | postgresql: 104 | plugin: autotools 105 | source: https://ftp.postgresql.org/pub/source/v11.1/postgresql-11.1.tar.bz2 106 | stage: 107 | - usr/bin 108 | - usr/include/postgresql 109 | - usr/lib 110 | - usr/share/doc/postgresql 111 | - usr/share/postgresql 112 | build-packages: 113 | - bison 114 | - flex 115 | - libreadline-dev 116 | - zlib1g-dev 117 | - python-dev 118 | - tcl8.6-dev 119 | - libssl-dev 120 | - libpam0g-dev 121 | - libxml2-dev 122 | - libxslt1-dev 123 | - uuid-dev 124 | - libxml2-utils 125 | - openjade 126 | - opensp 127 | - xsltproc 128 | - gettext 129 | - libperl-dev 130 | - dpkg-dev 131 | - pkg-config 132 | - libicu-dev 133 | - libipc-run-perl 134 | - libio-pty-perl 135 | stage-packages: 136 | - libc-bin 137 | - locales 138 | - libxml2 139 | - libasn1-8-heimdal 140 | - libgssapi3-heimdal 141 | - libhcrypto4-heimdal 142 | - libheimbase1-heimdal 143 | - libheimntlm0-heimdal 144 | - libhx509-5-heimdal 145 | - libkrb5-26-heimdal 146 | - libperl5.30 147 | - libpython2.7 148 | - libroken18-heimdal 149 | - libsasl2-2 150 | - libtcl8.6 151 | - libwind0-heimdal 152 | - libxslt1.1 153 | - util-linux 154 | override-build: | 155 | HOST_MULTIARCH=$(gcc -print-multiarch) 156 | ARCH=$(dpkg-architecture -qDEB_HOST_ARCH_BITS) 157 | 158 | if [ $ARCH -eq 64 ]; then 159 | EXTRA_CFLAGS="-fno-omit-frame-pointer" 160 | 161 | elif [ $ARCH -eq 32 ]; then 162 | EXTRA_CFLAGS="-fPIC -pie" 163 | fi 164 | ./configure \ 165 | LDFLAGS="-Wl,--as-needed -L/usr/lib/mit-krb5 -L/usr/lib/$HOST_MULTIARCH/mit-krb5" \ 166 | CFLAGS="-I/usr/include/mit-krb5 $EXTRA_CFLAGS" \ 167 | --prefix=/usr \ 168 | --localstatedir=/etc \ 169 | --sysconfdir=/var \ 170 | --enable-nls \ 171 | --enable-integer-datetimes \ 172 | --enable-thread-safety \ 173 | --enable-tap-tests \ 174 | --enable-debug \ 175 | --disable-rpath \ 176 | --with-icu \ 177 | --with-uuid=e2fs \ 178 | --with-gnu-ld \ 179 | --with-pgport=5432 \ 180 | --with-system-tzdata=/usr/share/zoneinfo \ 181 | --with-tcl \ 182 | --with-tclconfig=/usr/lib/tcl8.6/ \ 183 | --with-perl \ 184 | --with-python \ 185 | --with-pam \ 186 | --with-openssl \ 187 | --with-libxml \ 188 | --with-libxslt \ 189 | && make world \ 190 | && make install-world DESTDIR=$SNAPCRAFT_PART_INSTALL 191 | 192 | server: 193 | plugin: rust 194 | source: https://github.com/knkski/lemmy.git 195 | source-branch: foo 196 | build-packages: 197 | - build-essential 198 | - libpq-dev 199 | - libssl-dev 200 | - pkg-config 201 | override-build: | 202 | set -eux 203 | echo $PWD 204 | cargo install mdbook --no-default-features --version "^0.4" 205 | mdbook build docs/ 206 | cp -r docs/book $SNAPCRAFT_PART_INSTALL/documentation 207 | cp config/defaults.hjson $SNAPCRAFT_PART_INSTALL/defaults.hjson 208 | snapcraftctl build 209 | snapcraftctl set-version $(grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+' lemmy_api/src/version.rs) 210 | stage-packages: 211 | - libpq5 212 | - libssl1.1 213 | stage: 214 | - bin/lemmy_server 215 | - usr/lib 216 | - documentation 217 | - defaults.hjson 218 | 219 | ui: 220 | plugin: nil 221 | source: https://github.com/LemmyNet/lemmy-ui.git 222 | after: [node, yarn] 223 | override-build: | 224 | set -eux 225 | pwd 226 | yarn install --pure-lockfile 227 | yarn 228 | yarn build:prod 229 | snapcraftctl build 230 | mkdir $SNAPCRAFT_PART_INSTALL/ui 231 | cp -r dist $SNAPCRAFT_PART_INSTALL/ui/dist 232 | cp -r node_modules $SNAPCRAFT_PART_INSTALL/ui/node_modules 233 | 234 | iframely: 235 | plugin: nil 236 | source: https://github.com/itteco/iframely.git 237 | build-packages: 238 | - libssl1.1 239 | build-environment: 240 | - npm_config_unsafe_perm: 'true' 241 | after: [node, yarn] 242 | override-build: | 243 | set -eux 244 | snapcraftctl build 245 | mkdir $SNAPCRAFT_PART_INSTALL/iframely 246 | cp -r *.js package.json lib/ modules/ $SNAPCRAFT_PART_INSTALL/iframely/ 247 | cd $SNAPCRAFT_PART_INSTALL/iframely 248 | npm install 249 | stage: 250 | - iframely 251 | 252 | imagemagick: 253 | plugin: autotools 254 | source: http://www.imagemagick.org/download/ImageMagick.tar.gz 255 | autotools-configure-parameters: 256 | - --enable-shared 257 | - --disable-static 258 | - --disable-docs 259 | - --with-utilities=no 260 | - --with-magick-plus-plus=no 261 | - --without-perl 262 | - --with-xml=no 263 | - --with-png=yes 264 | - --with-jpeg=yes 265 | - --with-webp=yes 266 | - --without-x 267 | build-packages: 268 | - libjpeg-dev 269 | - libpng-dev 270 | - libwebp-dev 271 | stage-packages: 272 | - libjpeg8 273 | - libpng16-16 274 | - libwebp6 275 | - libgomp1 276 | - libwebpdemux2 277 | - libwebpmux3 278 | organize: 279 | usr/local/include/ImageMagick-7: include 280 | usr/local/lib: lib 281 | usr/local/bin: bin 282 | usr/lib: lib 283 | stage: 284 | - lib/ 285 | - include/ 286 | - bin/ 287 | 288 | pict-rs: 289 | plugin: rust 290 | source: https://git.asonix.dog/asonix/pict-rs.git 291 | after: [imagemagick] 292 | build-environment: 293 | - IMAGE_MAGICK_DIR: /root/stage/ 294 | build-packages: 295 | - libgexiv2-dev 296 | - clang 297 | - libclang-dev 298 | - llvm-dev 299 | - libavutil-dev 300 | - libavformat-dev 301 | - libavfilter-dev 302 | - libavdevice-dev 303 | - libavresample-dev 304 | stage-packages: 305 | - libgexiv2-2 306 | - libwmf0.2-7 307 | - libopenexr24 308 | - libdjvulibre21 309 | - ffmpeg 310 | - libavcodec58 311 | - libavdevice58 312 | - libavfilter7 313 | - libavformat58 314 | - libavutil56 315 | - libwebpdemux2 316 | stage: 317 | - bin/pict-rs 318 | - lib 319 | - lib64 320 | - usr 321 | 322 | apps: 323 | lemmy: 324 | environment: 325 | LEMMY_CONFIG_DEFAULTS_LOCATION: $SNAP_DATA/defaults.hjson 326 | LEMMY_CONFIG_LOCATION: $SNAP_DATA/config.hjson 327 | LEMMY_FRONT_END_DIR: $SNAP/ui/dist/ 328 | command: usr/bin/wrapper-lemmy 329 | plugs: 330 | - network 331 | - network-bind 332 | daemon: simple 333 | pictrs: 334 | command: usr/bin/wrapper-pictrs 335 | plugs: 336 | - network 337 | - network-bind 338 | daemon: simple 339 | database: 340 | command: usr/bin/wrapper-initialize 341 | plugs: 342 | - network 343 | - network-bind 344 | daemon: simple 345 | nginx: 346 | command: usr/bin/wrapper-nginx 347 | plugs: 348 | - network 349 | - network-bind 350 | daemon: simple 351 | ui: 352 | command: usr/bin/wrapper-ui 353 | plugs: 354 | - network 355 | - network-bind 356 | daemon: simple 357 | iframely: 358 | command: usr/bin/wrapper-iframely 359 | plugs: 360 | - network 361 | - network-bind 362 | daemon: simple 363 | initialize: 364 | command: usr/bin/wrapper-initialize 365 | plugs: 366 | - network 367 | - network-bind 368 | initdb: 369 | command: usr/bin/initdb 370 | plugs: 371 | - network 372 | - network-bind 373 | pgctl: 374 | command: usr/bin/wrapper-pg_ctl 375 | plugs: 376 | - network 377 | - network-bind 378 | node: 379 | command: bin/node 380 | npm: 381 | command: bin/npm 382 | npx: 383 | command: bin/npx 384 | yarn: 385 | command: bin/yarn.js 386 | yarnpkg: 387 | command: bin/yarn.js 388 | --------------------------------------------------------------------------------