]> Untitled Git - lemmy.git/commitdiff
Updating docker-compose to version 3
authorDessalines <tyhou13@gmx.com>
Wed, 21 Aug 2019 22:29:35 +0000 (15:29 -0700)
committerDessalines <tyhou13@gmx.com>
Wed, 21 Aug 2019 22:29:35 +0000 (15:29 -0700)
- Removing health checks.
- #227

README.md
docker/dev/docker-compose.yml
docker/prod/docker-compose.yml

index af945f4271d92151835bf66239ee564a9eeb1c9a..2b0e8042b17f0d97df30ec1a9b321b03d87ff3fc 100644 (file)
--- 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
 
index 515a1e4cfd14773bf6b89edef1d6ad9207f7a8fc..b7ab8c2bb3e3db37c39c996574d0cf8a0db8f5d5 100644 (file)
@@ -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:
index dab2a9c323308855cc15f77a51bcf45c3ce15865..0b02252219784a472bfc519f5d05ccd21ce4bd2c 100644 (file)
@@ -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: