diff options
author | Felix Ableitner <me@nutomic.com> | 2020-03-12 12:34:37 +0100 |
---|---|---|
committer | Felix Ableitner <me@nutomic.com> | 2020-03-12 12:34:37 +0100 |
commit | 063811cb60028037d79cf8f3c22e1e8c9f3af8ce (patch) | |
tree | a636941025bc5fbc77d0841abbf92abab773ad82 /docker | |
parent | 27c07f1f84d02bf8baa2bceb1d8a0effac67a6c9 (diff) | |
parent | 4fbf55d79e355608c75aa8218cd7f487c58fa04d (diff) |
Merge branch 'master' into federation
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/dev/deploy.sh | 17 | ||||
-rw-r--r-- | docker/dev/docker-compose.yml | 23 | ||||
-rw-r--r-- | docker/iframely.config.local.js | 2 | ||||
-rw-r--r-- | docker/lemmy.hjson | 2 | ||||
-rw-r--r-- | docker/prod/docker-compose.yml | 25 |
5 files changed, 37 insertions, 32 deletions
diff --git a/docker/dev/deploy.sh b/docker/dev/deploy.sh index 38ea6161..db2294fa 100755 --- a/docker/dev/deploy.sh +++ b/docker/dev/deploy.sh @@ -1,24 +1,26 @@ #!/bin/sh git checkout master +# Import translations +git fetch weblate +git merge weblate/master + # Creating the new tag new_tag="$1" -git tag $new_tag - third_semver=$(echo $new_tag | cut -d "." -f 3) # Setting the version on the front end cd ../../ -echo "export const version: string = '$(git describe --tags)';" > "ui/src/version.ts" +echo "export const version: string = '$new_tag';" > "ui/src/version.ts" git add "ui/src/version.ts" # Setting the version on the backend -echo "pub const VERSION: &str = \"$(git describe --tags)\";" > "server/src/version.rs" +echo "pub const VERSION: &str = \"$new_tag\";" > "server/src/version.rs" git add "server/src/version.rs" # Setting the version for Ansible -git describe --tags > "ansible/VERSION" +echo $new_tag > "ansible/VERSION" git add "ansible/VERSION" -cd docker/dev +cd docker/dev || exit # Changing the docker-compose prod sed -i "s/dessalines\/lemmy:.*/dessalines\/lemmy:$new_tag/" ../prod/docker-compose.yml @@ -28,6 +30,7 @@ git add ../../ansible/templates/docker-compose.yml # The commit git commit -m"Version $new_tag" +git tag $new_tag # Rebuilding docker docker-compose build @@ -69,5 +72,5 @@ git push origin $new_tag git push # Pushing to any ansible deploys -cd ../../ansible +cd ../../ansible || exit ansible-playbook lemmy.yml --become diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 987be4d5..64ba1db4 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -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: diff --git a/docker/iframely.config.local.js b/docker/iframely.config.local.js index 5c00cb14..8e8bc21f 100644 --- a/docker/iframely.config.local.js +++ b/docker/iframely.config.local.js @@ -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 diff --git a/docker/lemmy.hjson b/docker/lemmy.hjson index 55c2f2b7..5a6d1ff1 100644 --- a/docker/lemmy.hjson +++ b/docker/lemmy.hjson @@ -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 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index ac46ece3..70c6bfe7 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -1,39 +1,40 @@ 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.25 + image: dessalines/lemmy:v0.6.39 ports: - "127.0.0.1:8536:8536" restart: always 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: |