From: Dessalines Date: Wed, 21 Aug 2019 22:29:35 +0000 (-0700) Subject: Updating docker-compose to version 3 X-Git-Url: http://these/git/%7Bicon?a=commitdiff_plain;h=bdb1c72153e6491a09ee6ed197e708ccef795e7e;p=lemmy.git Updating docker-compose to version 3 - Removing health checks. - #227 --- diff --git a/README.md b/README.md index af945f42..2b0e8042 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,8 @@ Make sure you have both docker and docker-compose(>=`1.24.0`) installed. mkdir lemmy/ cd lemmy/ wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml -wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/env -O .env -# Edit the .env for custom passwords +wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/.env +# Edit the .env if you want custom passwords docker-compose up -d ``` @@ -125,8 +125,9 @@ and goto http://localhost:8536 #### Set up Postgres DB ``` - psql -c "create user rrr with password 'rrr' superuser;" -U postgres - psql -c 'create database rrr with owner rrr;' -U postgres + psql -c "create user lemmy with password 'password' superuser;" -U postgres + psql -c 'create database lemmy with owner lemmy;' -U postgres + export DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy ``` #### Running @@ -160,7 +161,7 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent If you'd like to add translations, take a look a look at the [english translation file](ui/src/translations/en.ts). -- Languages supported: `en`, `zh`, `fr`, `sv`, `de`, `ru`, `de` +- Languages supported: English (`en`), Chinese (`zh`), French (`fr`), Swedish (`sv`), German (`de`), Russian (`ru`). ## Credits diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 515a1e4c..b7ab8c2b 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -1,20 +1,14 @@ -version: '2.4' +version: '3.3' services: lemmy_db: image: postgres:12-alpine - restart: always environment: - POSTGRES_USER=lemmy - POSTGRES_PASSWORD=${DATABASE_PASSWORD} - POSTGRES_DB=lemmy volumes: - lemmy_db:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U lemmy"] - interval: 5s - timeout: 5s - retries: 20 lemmy: build: context: ../../ @@ -26,9 +20,7 @@ services: - DATABASE_URL=${DATABASE_URL} - JWT_SECRET=${JWT_SECRET} - HOSTNAME=${DOMAIN} - restart: always depends_on: - lemmy_db: - condition: service_healthy + - lemmy_db volumes: lemmy_db: diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index dab2a9c3..0b022522 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -1,23 +1,16 @@ -version: '2.4' +version: '3.3' services: lemmy_db: image: postgres:12-alpine - restart: always environment: - POSTGRES_USER=lemmy - POSTGRES_PASSWORD=${DATABASE_PASSWORD} - POSTGRES_DB=lemmy volumes: - lemmy_db:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U lemmy"] - interval: 5s - timeout: 5s - retries: 20 lemmy: image: dessalines/lemmy:v0.0.7.3 - restart: always ports: - "8536:8536" environment: @@ -25,9 +18,7 @@ services: - DATABASE_URL=${DATABASE_URL} - JWT_SECRET=${JWT_SECRET} - HOSTNAME=${DOMAIN} - restart: always depends_on: - lemmy_db: - condition: service_healthy + - lemmy_db volumes: lemmy_db: