diff --git a/.env.docker b/.env.docker index d52444d11..72032e0e6 100644 --- a/.env.docker +++ b/.env.docker @@ -56,11 +56,16 @@ MAIL_ENCRYPTION=null ## Databases (MySQL) DB_CONNECTION=mysql -DB_HOST=127.0.0.1 +DB_DATABASE=pixelfed_prod +DB_HOST=db +DB_PASSWORD=pixelfed_db_pass DB_PORT=3306 -DB_DATABASE=pixelfed DB_USERNAME=pixelfed -DB_PASSWORD=pixelfed +# pass the same values to the db itself +MYSQL_DATABASE=pixelfed_prod +MYSQL_PASSWORD=pixelfed_db_pass +MYSQL_RANDOM_ROOT_PASSWORD=true +MYSQL_USER=pixelfed ## Databases (Postgres) #DB_CONNECTION=pgsql @@ -74,7 +79,7 @@ DB_PASSWORD=pixelfed REDIS_CLIENT=phpredis REDIS_SCHEME=tcp REDIS_HOST=redis -REDIS_PASSWORD=null +REDIS_PASSWORD=redis_password REDIS_PORT=6379 REDIS_DATABASE=0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a3ae897..441b99baf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ - Updated Compose Apis, refactor rate limits. ([42375b3d](https://github.com/pixelfed/pixelfed/commit/42375b3d)) - Updated PublicApiController, show unlisted comments. ([e1c6297e](https://github.com/pixelfed/pixelfed/commit/e1c6297e)) - Updated ApiV1Controller, add missing variable. ([886ea617](https://github.com/pixelfed/pixelfed/commit/886ea617)) +- Updated PublicApiController, limit network pagination to 3 months. ([10119bbb](https://github.com/pixelfed/pixelfed/commit/10119bbb)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index 23231b218..dabe5a6d9 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -523,7 +523,7 @@ class PublicApiController extends Controller ->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) ->whereNotNull('uri') ->whereScope('public') - // ->where('created_at', '>', now()->subMonths(3)) + ->where('created_at', '>', now()->subMonths(3)) ->orderBy('created_at', 'desc') ->limit($limit) ->get(); diff --git a/docker-compose.yml b/docker-compose.yml index 772fd7c2f..57b2a6d33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,6 @@ version: '3' # if the volumes are properly shared between cluster members. services: - ## App and Worker app: # Comment to use dockerhub image @@ -21,16 +20,15 @@ services: image: pixelfed restart: unless-stopped env_file: - - ./.env.docker + - .env.docker volumes: - - "app-storage:/var/www/storage" - - "app-bootstrap:/var/www/bootstrap" - - "./.env.docker:/var/www/.env" + - app-storage:/var/www/storage + - app-bootstrap:/var/www/bootstrap networks: - external - internal ports: - - "8080:80" + - "8080:80" depends_on: - db - redis @@ -42,10 +40,10 @@ services: image: pixelfed restart: unless-stopped env_file: - - ./.env.docker + - .env.docker volumes: - - "app-storage:/var/www/storage" - - "app-bootstrap:/var/www/bootstrap" + - app-storage:/var/www/storage + - app-bootstrap:/var/www/bootstrap networks: - external - internal @@ -61,17 +59,16 @@ services: networks: - internal command: --default-authentication-plugin=mysql_native_password - environment: - - MYSQL_DATABASE=pixelfed - - MYSQL_USER=${DB_USERNAME} - - MYSQL_PASSWORD=${DB_PASSWORD} - - MYSQL_RANDOM_ROOT_PASSWORD=true + env_file: + - .env.docker volumes: - "db-data:/var/lib/mysql" redis: image: redis:5-alpine restart: unless-stopped + env_file: + - .env.docker volumes: - "redis-data:/data" networks: diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index b9302f9ba..b4f72241b 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -334,7 +334,7 @@
by {{statusUsername}} - • + • Follow
@@ -348,7 +348,7 @@by {{statusUsername}} -
@@ -400,7 +400,7 @@ - @@ -442,7 +442,7 @@ - + @@ -687,10 +687,10 @@ .postPresenterContainer { background: #fff; } - @media(min-width: 720px) { - .postPresenterContainer { - min-height: 600px; - } + @media(min-width: 720px) { + .postPresenterContainer { + min-height: 600px; + } } ::-webkit-scrollbar { width: 0px; @@ -773,10 +773,11 @@ export default { 'status-profile-url', 'status-avatar', 'status-profile-id', - 'profile-layout' + 'profile-layout', + 'profile-recent' ], - components: { + components: { VueTribute }, @@ -941,12 +942,15 @@ export default { this.fetchComments(); } this.loaded = true; - setTimeout(function() { - self.fetchProfilePosts(); - }, 3000); + + if(this.profileRecent !== false) { + setTimeout(function() { + self.fetchProfilePosts(); + }, 3000); + } setTimeout(function() { self.fetchState(); - document.querySelectorAll('.status-comment .postCommentsContainer .comment-body a').forEach(function(i, e) { + document.querySelectorAll('.status-comment .postCommentsContainer .comment-body a').forEach(function(i, e) { i.href = App.util.format.rewriteLinks(i); }); }, 500); @@ -1202,7 +1206,7 @@ export default { comment: this.replyText, sensitive: this.replySensitive } - + this.replyText = ''; axios.post('/i/comment', data) @@ -1262,7 +1266,7 @@ export default { this.redirect('/login?next=' + encodeURIComponent(window.location.pathname)); return; } - + if(this.status.comments_disabled) { return; } @@ -1284,7 +1288,7 @@ export default { axios.get(url) .then(response => { let self = this; - this.results = this.layout == 'metro' ? + this.results = this.layout == 'metro' ? _.reverse(response.data.data) : response.data.data; this.pagination = response.data.meta.pagination; @@ -1294,7 +1298,7 @@ export default { $('.postCommentsLoader').addClass('d-none'); $('.postCommentsContainer').removeClass('d-none'); setTimeout(function() { - document.querySelectorAll('.status-comment .postCommentsContainer .comment-body a').forEach(function(i, e) { + document.querySelectorAll('.status-comment .postCommentsContainer .comment-body a').forEach(function(i, e) { i.href = App.util.format.rewriteLinks(i); }); }, 500); @@ -1505,9 +1509,9 @@ export default { if(profile.local == true) { return reply.url; } else { - return showOrigin ? + return showOrigin ? reply.url : - '/i/web/post/_/' + profile.id + '/' + reply.id; + '/i/web/post/_/' + profile.id + '/' + reply.id; } }, @@ -1575,7 +1579,7 @@ export default { }); swal('Untagged', 'You have been untagged from this post.', 'success'); }).catch(err => { - swal('An Error Occurred', 'Please try again later.', 'error'); + swal('An Error Occurred', 'Please try again later.', 'error'); }); }, @@ -1737,7 +1741,7 @@ export default { }, 500); }); }, - + }, } diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 7364fa603..1f5a2d2ac 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -130,7 +130,7 @@Photo by @{{status.account.username}} licensed under {{status.media_attachments[0].license.title}}