Change ports and container names Move volumes into subfolder (ref #474) Merge pull request #587 from StaticallyTypedRice/patch-2 Clarify that content violating this code of conduct will likely be removed. Clarify that content violating this code of conduct will likely be removed. Lemmy has a general policy of removing any content that violates the rules whenever possible, which is typically a good thing, and I felt it important to mention that in the code of conduct. Co-authored-by: Felix <me@nutomic.com> Co-authored-by: Dessalines <dessalines@users.noreply.github.com> Co-authored-by: Richie Zhang <12566991+StaticallyTypedRice@users.noreply.github.com>
This commit is contained in:
parent
a0e497b793
commit
8431f53805
9 changed files with 41 additions and 41 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ docker/dev/env_deploy.sh
|
||||||
build/
|
build/
|
||||||
.idea/
|
.idea/
|
||||||
ui/src/translations
|
ui/src/translations
|
||||||
|
docker/dev/volumes
|
2
CODE_OF_CONDUCT.md
vendored
2
CODE_OF_CONDUCT.md
vendored
|
@ -19,7 +19,7 @@ These are the policies for upholding our community’s standards of conduct. If
|
||||||
|
|
||||||
1. Remarks that violate the Lemmy standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
|
1. Remarks that violate the Lemmy standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
|
||||||
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
|
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
|
||||||
3. Moderators will first respond to such remarks with a warning.
|
3. Moderators will first respond to such remarks with a warning, at the same time the offending content will likely be removed whenever possible.
|
||||||
4. If the warning is unheeded, the user will be “kicked,” i.e., kicked out of the communication channel to cool off.
|
4. If the warning is unheeded, the user will be “kicked,” i.e., kicked out of the communication channel to cool off.
|
||||||
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
|
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
|
||||||
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
|
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
|
||||||
|
|
2
ansible/templates/config.hjson
vendored
2
ansible/templates/config.hjson
vendored
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
database: {
|
database: {
|
||||||
password: "{{ postgres_password }}"
|
password: "{{ postgres_password }}"
|
||||||
host: "lemmy_db"
|
host: "postgres"
|
||||||
}
|
}
|
||||||
hostname: "{{ domain }}"
|
hostname: "{{ domain }}"
|
||||||
jwt_secret: "{{ jwt_password }}"
|
jwt_secret: "{{ jwt_password }}"
|
||||||
|
|
23
ansible/templates/docker-compose.yml
vendored
23
ansible/templates/docker-compose.yml
vendored
|
@ -9,31 +9,32 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./lemmy.hjson:/config/config.hjson:ro
|
- ./lemmy.hjson:/config/config.hjson:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy_db
|
- postgres
|
||||||
- lemmy_pictshare
|
- pictshare
|
||||||
|
- iframely
|
||||||
|
|
||||||
lemmy_db:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=lemmy
|
- POSTGRES_USER=lemmy
|
||||||
- POSTGRES_PASSWORD={{ postgres_password }}
|
- POSTGRES_PASSWORD={{ postgres_password }}
|
||||||
- POSTGRES_DB=lemmy
|
- POSTGRES_DB=lemmy
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_db:/var/lib/postgresql/data
|
- ./volumes/postgres:/var/lib/postgresql/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
lemmy_pictshare:
|
pictshare:
|
||||||
image: shtripok/pictshare:latest
|
image: shtripok/pictshare:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:80"
|
- "127.0.0.1:8537:80"
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_pictshare:/usr/share/nginx/html/data
|
- ./volumes/pictshare:/usr/share/nginx/html/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
lemmy_iframely:
|
iframely:
|
||||||
image: dogbin/iframely:latest
|
image: dogbin/iframely:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8061:8061"
|
- "127.0.0.1:8061:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./iframely.config.local.js:/iframely/config.local.js:ro
|
- ./iframely.config.local.js:/iframely/config.local.js:ro
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -42,8 +43,4 @@ services:
|
||||||
image: mwader/postfix-relay
|
image: mwader/postfix-relay
|
||||||
environment:
|
environment:
|
||||||
- POSTFIX_myhostname={{ domain }}
|
- POSTFIX_myhostname={{ domain }}
|
||||||
restart: "always"
|
restart: "always"
|
||||||
volumes:
|
|
||||||
lemmy_db:
|
|
||||||
lemmy_pictshare:
|
|
||||||
lemmy_iframely:
|
|
23
docker/dev/docker-compose.yml
vendored
23
docker/dev/docker-compose.yml
vendored
|
@ -1,15 +1,16 @@
|
||||||
version: '3.3'
|
version: '3.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
lemmy_db:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=lemmy
|
- POSTGRES_USER=lemmy
|
||||||
- POSTGRES_PASSWORD=password
|
- POSTGRES_PASSWORD=password
|
||||||
- POSTGRES_DB=lemmy
|
- POSTGRES_DB=lemmy
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_db:/var/lib/postgresql/data
|
- ./volumes/postgres:/var/lib/postgresql/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
lemmy:
|
lemmy:
|
||||||
build:
|
build:
|
||||||
context: ../../
|
context: ../../
|
||||||
|
@ -20,22 +21,22 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ../lemmy.hjson:/config/config.hjson:ro
|
- ../lemmy.hjson:/config/config.hjson:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy_db
|
- postgres
|
||||||
lemmy_pictshare:
|
- pictshare
|
||||||
|
- iframely
|
||||||
|
|
||||||
|
pictshare:
|
||||||
image: shtripok/pictshare:latest
|
image: shtripok/pictshare:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:80"
|
- "127.0.0.1:8537:80"
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_pictshare:/usr/share/nginx/html/data
|
- ./volumes/pictshare:/usr/share/nginx/html/data
|
||||||
restart: always
|
restart: always
|
||||||
lemmy_iframely:
|
|
||||||
|
iframely:
|
||||||
image: dogbin/iframely:latest
|
image: dogbin/iframely:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8061:8061"
|
- "127.0.0.1:8061:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ../iframely.config.local.js:/iframely/config.local.js:ro
|
- ../iframely.config.local.js:/iframely/config.local.js:ro
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
|
||||||
lemmy_db:
|
|
||||||
lemmy_pictshare:
|
|
||||||
lemmy_iframely:
|
|
||||||
|
|
2
docker/iframely.config.local.js
vendored
2
docker/iframely.config.local.js
vendored
|
@ -37,7 +37,7 @@
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
port: 8061, //can be overridden by PORT env var
|
port: 80, //can be overridden by PORT env var
|
||||||
host: '0.0.0.0', // Dockers beware. See https://github.com/itteco/iframely/issues/132#issuecomment-242991246
|
host: '0.0.0.0', // Dockers beware. See https://github.com/itteco/iframely/issues/132#issuecomment-242991246
|
||||||
//can be overridden by HOST env var
|
//can be overridden by HOST env var
|
||||||
|
|
||||||
|
|
2
docker/lemmy.hjson
vendored
2
docker/lemmy.hjson
vendored
|
@ -5,7 +5,7 @@
|
||||||
# password to connect to postgres
|
# password to connect to postgres
|
||||||
password: "password"
|
password: "password"
|
||||||
# host where postgres is running
|
# host where postgres is running
|
||||||
host: "lemmy_db"
|
host: "postgres"
|
||||||
# port where postgres can be accessed
|
# port where postgres can be accessed
|
||||||
port: 5432
|
port: 5432
|
||||||
# name of the postgres database for lemmy
|
# name of the postgres database for lemmy
|
||||||
|
|
23
docker/prod/docker-compose.yml
vendored
23
docker/prod/docker-compose.yml
vendored
|
@ -1,15 +1,16 @@
|
||||||
version: '3.3'
|
version: '3.3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
lemmy_db:
|
postgres:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=lemmy
|
- POSTGRES_USER=lemmy
|
||||||
- POSTGRES_PASSWORD=password
|
- POSTGRES_PASSWORD=password
|
||||||
- POSTGRES_DB=lemmy
|
- POSTGRES_DB=lemmy
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_db:/var/lib/postgresql/data
|
- ./volumes/postgres:/var/lib/postgresql/data
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
lemmy:
|
lemmy:
|
||||||
image: dessalines/lemmy:v0.6.33
|
image: dessalines/lemmy:v0.6.33
|
||||||
ports:
|
ports:
|
||||||
|
@ -18,22 +19,22 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./lemmy.hjson:/config/config.hjson:ro
|
- ./lemmy.hjson:/config/config.hjson:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- lemmy_db
|
- postgres
|
||||||
lemmy_pictshare:
|
- pictshare
|
||||||
|
- iframely
|
||||||
|
|
||||||
|
pictshare:
|
||||||
image: shtripok/pictshare:latest
|
image: shtripok/pictshare:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8537:80"
|
- "127.0.0.1:8537:80"
|
||||||
volumes:
|
volumes:
|
||||||
- lemmy_pictshare:/usr/share/nginx/html/data
|
- ./volumes/pictshare:/usr/share/nginx/html/data
|
||||||
restart: always
|
restart: always
|
||||||
lemmy_iframely:
|
|
||||||
|
iframely:
|
||||||
image: dogbin/iframely:latest
|
image: dogbin/iframely:latest
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8061:8061"
|
- "127.0.0.1:8061:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./iframely.config.local.js:/iframely/config.local.js:ro
|
- ./iframely.config.local.js:/iframely/config.local.js:ro
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
|
||||||
lemmy_db:
|
|
||||||
lemmy_pictshare:
|
|
||||||
lemmy_iframely:
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ pub struct IframelyResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fetch_iframely(url: &str) -> Result<IframelyResponse, failure::Error> {
|
pub fn fetch_iframely(url: &str) -> Result<IframelyResponse, failure::Error> {
|
||||||
let fetch_url = format!("http://lemmy_iframely:8061/oembed?url={}", url);
|
let fetch_url = format!("http://iframely/oembed?url={}", url);
|
||||||
let text = chttp::get(&fetch_url)?.text()?;
|
let text = chttp::get(&fetch_url)?.text()?;
|
||||||
let res: IframelyResponse = serde_json::from_str(&text)?;
|
let res: IframelyResponse = serde_json::from_str(&text)?;
|
||||||
Ok(res)
|
Ok(res)
|
||||||
|
@ -169,7 +169,7 @@ pub struct PictshareResponse {
|
||||||
|
|
||||||
pub fn fetch_pictshare(image_url: &str) -> Result<PictshareResponse, failure::Error> {
|
pub fn fetch_pictshare(image_url: &str) -> Result<PictshareResponse, failure::Error> {
|
||||||
let fetch_url = format!(
|
let fetch_url = format!(
|
||||||
"http://lemmy_pictshare/api/geturl.php?url={}",
|
"http://pictshare/api/geturl.php?url={}",
|
||||||
utf8_percent_encode(image_url, NON_ALPHANUMERIC)
|
utf8_percent_encode(image_url, NON_ALPHANUMERIC)
|
||||||
);
|
);
|
||||||
let text = chttp::get(&fetch_url)?.text()?;
|
let text = chttp::get(&fetch_url)?.text()?;
|
||||||
|
|
Reference in a new issue