forked from nutomic/lemmy
Change ports and container names
This commit is contained in:
parent
17e307973f
commit
0880e597c0
8 changed files with 33 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ docker/dev/env_deploy.sh
|
|||
build/
|
||||
.idea/
|
||||
ui/src/translations
|
||||
docker/dev/volumes
|
2
ansible/templates/config.hjson
vendored
2
ansible/templates/config.hjson
vendored
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
database: {
|
||||
password: "{{ postgres_password }}"
|
||||
host: "lemmy_db"
|
||||
host: "postgres"
|
||||
}
|
||||
hostname: "{{ domain }}"
|
||||
jwt_secret: "{{ jwt_password }}"
|
||||
|
|
13
ansible/templates/docker-compose.yml
vendored
13
ansible/templates/docker-compose.yml
vendored
|
@ -9,10 +9,11 @@ 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
|
||||
|
@ -22,7 +23,7 @@ services:
|
|||
- ./volumes/postgres:/var/lib/postgresql/data
|
||||
restart: always
|
||||
|
||||
lemmy_pictshare:
|
||||
pictshare:
|
||||
image: shtripok/pictshare:latest
|
||||
ports:
|
||||
- "127.0.0.1:8537:80"
|
||||
|
@ -30,10 +31,10 @@ services:
|
|||
- ./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
|
||||
|
|
19
docker/dev/docker-compose.yml
vendored
19
docker/dev/docker-compose.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
version: '3.3'
|
||||
|
||||
services:
|
||||
lemmy_db:
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=lemmy
|
||||
|
@ -10,6 +10,7 @@ services:
|
|||
volumes:
|
||||
- ./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:
|
||||
- ./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:
|
||||
|
|
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
|
||||
//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: "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
|
||||
|
|
15
docker/prod/docker-compose.yml
vendored
15
docker/prod/docker-compose.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
version: '3.3'
|
||||
|
||||
services:
|
||||
lemmy_db:
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=lemmy
|
||||
|
@ -10,6 +10,7 @@ services:
|
|||
volumes:
|
||||
- ./volumes/postgres:/var/lib/postgresql/data
|
||||
restart: always
|
||||
|
||||
lemmy:
|
||||
image: dessalines/lemmy:v0.6.33
|
||||
ports:
|
||||
|
@ -18,18 +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:
|
||||
- ./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
|
||||
|
|
|
@ -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()?;
|
||||
|
|
Loading…
Reference in a new issue