mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-02 01:39:02 +00:00
parent
300fe15656
commit
fc6bd5ad83
|
@ -70,7 +70,7 @@ Make sure you have both docker and docker-compose(>=`1.24.0`) installed.
|
||||||
```
|
```
|
||||||
mkdir lemmy/
|
mkdir lemmy/
|
||||||
cd lemmy/
|
cd lemmy/
|
||||||
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/docker-compose.yml
|
wget https://raw.githubusercontent.com/dessalines/lemmy/master/docker/prod/docker-compose.yml
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ location / {
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/dessalines/lemmy
|
git clone https://github.com/dessalines/lemmy
|
||||||
cd lemmy
|
cd lemmy/docker
|
||||||
./docker_update.sh # This pulls the newest version, builds and runs it
|
./docker_update.sh # This pulls the newest version, builds and runs it
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2.4'
|
version: '2.4'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
lemmy_db:
|
||||||
image: postgres:12-alpine
|
image: postgres:12-alpine
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
|
@ -9,7 +9,7 @@ services:
|
||||||
POSTGRES_PASSWORD: rrr
|
POSTGRES_PASSWORD: rrr
|
||||||
POSTGRES_DB: rrr
|
POSTGRES_DB: rrr
|
||||||
volumes:
|
volumes:
|
||||||
- db:/var/lib/postgresql/data
|
- lemmy_db:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U rrr"]
|
test: ["CMD-SHELL", "pg_isready -U rrr"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
@ -17,17 +17,18 @@ services:
|
||||||
retries: 20
|
retries: 20
|
||||||
lemmy:
|
lemmy:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: ../../
|
||||||
|
dockerfile: docker/dev/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8536:8536"
|
- "8536:8536"
|
||||||
environment:
|
environment:
|
||||||
LEMMY_FRONT_END_DIR: /app/dist
|
LEMMY_FRONT_END_DIR: /app/dist
|
||||||
DATABASE_URL: postgres://rrr:rrr@db:5432/rrr
|
DATABASE_URL: postgres://rrr:rrr@lemmy_db:5432/rrr
|
||||||
JWT_SECRET: changeme
|
JWT_SECRET: changeme
|
||||||
HOSTNAME: rrr
|
HOSTNAME: rrr
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
lemmy_db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
lemmy_db:
|
1
docker/docker_db_backup.sh
Executable file
1
docker/docker_db_backup.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
docker exec -it dev_lemmy_db_1 pg_dumpall -c -U rrr > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
|
5
docker/docker_update.sh
Executable file
5
docker/docker_update.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
git pull
|
||||||
|
docker-compose -f dev/docker-compose.yml up -d --no-deps --build
|
|
@ -1 +0,0 @@
|
||||||
docker exec -it lemmy_db_1 pg_dumpall -c -U rrr > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
git pull
|
|
||||||
docker-compose up -d --no-deps --build
|
|
Loading…
Reference in a new issue