]> Untitled Git - lemmy.git/commitdiff
Move volumes into subfolder (ref #474) (#23)
authornutomic <nutomic@noreply.yerbamate.dev>
Mon, 9 Mar 2020 16:50:28 +0000 (16:50 +0000)
committerdessalines <dessalines@noreply.yerbamate.dev>
Mon, 9 Mar 2020 16:50:28 +0000 (16:50 +0000)
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>
.gitignore
CODE_OF_CONDUCT.md
ansible/templates/config.hjson
ansible/templates/docker-compose.yml
docker/dev/docker-compose.yml
docker/iframely.config.local.js
docker/lemmy.hjson
docker/prod/docker-compose.yml
server/src/lib.rs

index 2c0071a7131fa9460d78d5ecb366617f07386a12..d823aacab502196c11a29ed6671b12545c195f13 100644 (file)
@@ -6,3 +6,4 @@ docker/dev/env_deploy.sh
 build/
 .idea/
 ui/src/translations
+docker/dev/volumes
\ No newline at end of file
index b350ddbb96bdf51935efe8a6b6ec5cffa948efb3..5a6c7d6721505c75081ee8157f2ed56d0b8d7703 100644 (file)
@@ -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.)
 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.
 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.
index 42698dfbb5c10e1c0d7a941f9daf0c16e3a283b0..c0f387c49eb3438dc401c63dfc253398cbd19097 100644 (file)
@@ -1,7 +1,7 @@
 {
   database: {
     password: "{{ postgres_password }}"
-    host: "lemmy_db"
+    host: "postgres"
   }
   hostname: "{{ domain }}"
   jwt_secret: "{{ jwt_password }}"
index bf9aeeb5aa4ccea20869db9274adb852f7042b84..57ee142a6e58bffda3f7366974e53519b9fe65f5 100644 (file)
@@ -9,31 +9,32 @@ services:
     volumes:
       - ./lemmy.hjson:/config/config.hjson:ro
     depends_on:
-      - lemmy_db
-      - lemmy_pictshare
+      - postgres
+      - pictshare
+      - iframely
 
-  lemmy_db:
+  postgres:
     image: postgres:12-alpine
     environment:
       - POSTGRES_USER=lemmy
       - POSTGRES_PASSWORD={{ postgres_password }}
       - POSTGRES_DB=lemmy
     volumes:
-      - lemmy_db:/var/lib/postgresql/data
+      - ./volumes/postgres:/var/lib/postgresql/data
     restart: always
 
-  lemmy_pictshare:
+  pictshare:
     image: shtripok/pictshare:latest
     ports:
       - "127.0.0.1:8537:80"
     volumes:
-      - lemmy_pictshare:/usr/share/nginx/html/data
+      - ./volumes/pictshare:/usr/share/nginx/html/data
     restart: always
 
-  lemmy_iframely:
+  iframely:
     image: dogbin/iframely:latest
     ports:
-      - "127.0.0.1:8061:8061"
+      - "127.0.0.1:8061:80"
     volumes:
       - ./iframely.config.local.js:/iframely/config.local.js:ro
     restart: always
@@ -42,8 +43,4 @@ services:
     image: mwader/postfix-relay
     environment:
       - POSTFIX_myhostname={{ domain }}
-    restart: "always"
-volumes:
-  lemmy_db:
-  lemmy_pictshare:
-  lemmy_iframely:
+    restart: "always"
\ No newline at end of file
index 987be4d5b87448f3d9236002e47478cec7f0a13f..64ba1db433e248dc4ca762daa8d36fba5e4ac0b6 100644 (file)
@@ -1,15 +1,16 @@
 version: '3.3'
 
 services:
-  lemmy_db:
+  postgres:
     image: postgres:12-alpine
     environment:
       - POSTGRES_USER=lemmy
       - POSTGRES_PASSWORD=password
       - POSTGRES_DB=lemmy
     volumes:
-      - lemmy_db:/var/lib/postgresql/data
+      - ./volumes/postgres:/var/lib/postgresql/data
     restart: always
+
   lemmy:
     build: 
       context: ../../
@@ -20,22 +21,22 @@ services:
     volumes:
       - ../lemmy.hjson:/config/config.hjson:ro
     depends_on: 
-      - lemmy_db
-  lemmy_pictshare:
+      - postgres
+      - pictshare
+      - iframely
+
+  pictshare:
     image: shtripok/pictshare:latest
     ports:
       - "127.0.0.1:8537:80"
     volumes:
-      - lemmy_pictshare:/usr/share/nginx/html/data
+      - ./volumes/pictshare:/usr/share/nginx/html/data
     restart: always
-  lemmy_iframely:
+
+  iframely:
     image: dogbin/iframely:latest
     ports:
-      - "127.0.0.1:8061:8061"
+      - "127.0.0.1:8061:80"
     volumes:
       - ../iframely.config.local.js:/iframely/config.local.js:ro
     restart: always
-volumes:
-  lemmy_db:
-  lemmy_pictshare:
-  lemmy_iframely:
index 5c00cb14382ac6ddc6f4e3c243dd98e6c05c360c..8e8bc21fb3f23c55045aeaa67229670e545d35e4 100644 (file)
@@ -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
                             //can be overridden by HOST env var
 
index 55c2f2b76a0954ead7dda5702c4b962c563ef193..5a6d1ff11c88cd01d414a177a582de8092939350 100644 (file)
@@ -5,7 +5,7 @@
     # password to connect to postgres
     password: "password"
     # host where postgres is running
-    host: "lemmy_db"
+    host: "postgres"
     # port where postgres can be accessed
     port: 5432
     # name of the postgres database for lemmy
index 3e0b8284c2e35264c8dfd670992b2685b3f72459..bfe4bb8ee3a8399f2051e2c0cf97fc48c98751cd 100644 (file)
@@ -1,15 +1,16 @@
 version: '3.3'
 
 services:
-  lemmy_db:
+  postgres:
     image: postgres:12-alpine
     environment:
       - POSTGRES_USER=lemmy
       - POSTGRES_PASSWORD=password
       - POSTGRES_DB=lemmy
     volumes:
-      - lemmy_db:/var/lib/postgresql/data
+      - ./volumes/postgres:/var/lib/postgresql/data
     restart: always
+
   lemmy:
     image: dessalines/lemmy:v0.6.33
     ports:
@@ -18,22 +19,22 @@ services:
     volumes:
       - ./lemmy.hjson:/config/config.hjson:ro
     depends_on:
-      - lemmy_db
-  lemmy_pictshare:
+      - postgres
+      - pictshare
+      - iframely
+
+  pictshare:
     image: shtripok/pictshare:latest
     ports:
       - "127.0.0.1:8537:80"
     volumes:
-      - lemmy_pictshare:/usr/share/nginx/html/data
+      - ./volumes/pictshare:/usr/share/nginx/html/data
     restart: always
-  lemmy_iframely:
+
+  iframely:
     image: dogbin/iframely:latest
     ports:
-      - "127.0.0.1:8061:8061"
+      - "127.0.0.1:8061:80"
     volumes:
       - ./iframely.config.local.js:/iframely/config.local.js:ro
     restart: always
-volumes:
-  lemmy_db:
-  lemmy_pictshare:
-  lemmy_iframely:
index 60addd27240ded648c96ffc26e84e5e01ff8a647..f437c200ba01ce890bd307231d2fc5026ec27f5d 100644 (file)
@@ -155,7 +155,7 @@ pub struct IframelyResponse {
 }
 
 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 res: IframelyResponse = serde_json::from_str(&text)?;
   Ok(res)
@@ -169,7 +169,7 @@ pub struct PictshareResponse {
 
 pub fn fetch_pictshare(image_url: &str) -> Result<PictshareResponse, failure::Error> {
   let fetch_url = format!(
-    "http://lemmy_pictshare/api/geturl.php?url={}",
+    "http://pictshare/api/geturl.php?url={}",
     utf8_percent_encode(image_url, NON_ALPHANUMERIC)
   );
   let text = chttp::get(&fetch_url)?.text()?;