From 927ef3b057f809fe8d48ed000e60402efb93adef Mon Sep 17 00:00:00 2001
From: Alexandra Dunn
Date: Wed, 27 Jan 2021 11:44:14 -0800
Subject: [PATCH 01/13] docker-compose: store default db passwords in
.env.docker
and have redis use a password as well
---
.env.docker | 13 +++++++++----
docker-compose.yml | 25 +++++++++++--------------
2 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/.env.docker b/.env.docker
index 63b7fc5c5..f9291c570 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/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:
From 7e7d2e60ddd18837f8ce20fd55ef325fb1009857 Mon Sep 17 00:00:00 2001
From: Sasi Olin
Date: Mon, 22 Feb 2021 22:18:05 +0100
Subject: [PATCH 02/13] Fix label describing the wrong field in settings
---
resources/views/settings/home.blade.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/views/settings/home.blade.php b/resources/views/settings/home.blade.php
index 15a5ac71f..b55eaff16 100644
--- a/resources/views/settings/home.blade.php
+++ b/resources/views/settings/home.blade.php
@@ -58,7 +58,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 @@