mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-21 22:39:23 +01:00
Merge pull request 'Add a production-ready compose and enhance the development one' (#256) from TheFrenchGhosty/teddit:better-compose into main
Reviewed-on: https://codeberg.org/teddit/teddit/pulls/256
This commit is contained in:
commit
998fa01a39
48
README.md
48
README.md
@ -48,7 +48,53 @@ See ```CHANGELOG.md```
|
||||
|
||||
## Installation
|
||||
|
||||
### Docker-compose method
|
||||
### Docker-compose method (production)
|
||||
|
||||
```console
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
teddit:
|
||||
container_name: teddit
|
||||
image: teddit/teddit:latest
|
||||
environment:
|
||||
- DOMAIN=teddit.net
|
||||
- USE_HELMET=true
|
||||
- USE_HELMET_HSTS=true
|
||||
- TRUST_PROXY=true
|
||||
- REDIS_HOST=teddit-redis
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
networks:
|
||||
- teddit_net
|
||||
healthcheck:
|
||||
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:8080/about"]
|
||||
interval: 1m
|
||||
timeout: 3s
|
||||
depends_on:
|
||||
- teddit-redis
|
||||
|
||||
teddit-redis:
|
||||
container_name: teddit-redis
|
||||
image: redis:6.2.5-alpine
|
||||
command: redis-server
|
||||
environment:
|
||||
- REDIS_REPLICATION_MODE=master
|
||||
networks:
|
||||
- teddit_net
|
||||
|
||||
networks:
|
||||
teddit_net:
|
||||
```
|
||||
|
||||
Note: This compose is made for a true "production" setup, and is made to be used to have teddit behind a reverse proxy, if you don't want that and prefer to directly access teddit via its port:
|
||||
|
||||
- Change `ports: - "127.0.0.1:8080:8080"` to `ports: - "8080:8080"`
|
||||
- Remove `DOMAIN=teddit.net`, `USE_HELMET=true`, `USE_HELMET_HSTS=true`, `TRUST_PROXY=true`
|
||||
|
||||
|
||||
### Docker-compose method (development)
|
||||
|
||||
```console
|
||||
git clone https://codeberg.org/teddit/teddit
|
||||
|
@ -1,21 +1,16 @@
|
||||
# This docker-compose file is made for development purpose and build from source, if you want to use teddit in production, the README contains a production-ready docker-compose setup.
|
||||
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:6.2.5-alpine
|
||||
command: redis-server
|
||||
environment:
|
||||
- REDIS_REPLICATION_MODE=master
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- teddit_net
|
||||
web:
|
||||
|
||||
teddit:
|
||||
container_name: teddit
|
||||
build: .
|
||||
environment:
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_HOST=teddit-redis
|
||||
ports:
|
||||
- 8080:8080
|
||||
- "8080:8080"
|
||||
networks:
|
||||
- teddit_net
|
||||
healthcheck:
|
||||
@ -23,6 +18,16 @@ services:
|
||||
interval: 1m
|
||||
timeout: 3s
|
||||
depends_on:
|
||||
- redis
|
||||
- teddit-redis
|
||||
|
||||
teddit-redis:
|
||||
container_name: teddit-redis
|
||||
image: redis:6.2.5-alpine
|
||||
command: redis-server
|
||||
environment:
|
||||
- REDIS_REPLICATION_MODE=master
|
||||
networks:
|
||||
- teddit_net
|
||||
|
||||
networks:
|
||||
teddit_net:
|
||||
|
Loading…
Reference in New Issue
Block a user