Skip to content

Commit 1a013d6

Browse files
committed
improvements
1 parent 1a075be commit 1a013d6

File tree

6 files changed

+33
-25
lines changed

6 files changed

+33
-25
lines changed

.env.example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@ POSTGRESQL_DATABASE=db
1111

1212
# [REDIS]
1313
REDIS_PASSWORD=123456qwerty
14-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
15-
16-
# [PLAUSIBLE]
17-
PLAUSIBLE_POSTGRES_PASSWORD=123456qwerty
14+
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,44 +96,42 @@ The setup uses [Traefik](https://github.com/traefik/traefik), the cloud native a
9696

9797
You can always delete existing (if you don't need them) or add your own services, just make sure to apply necessary changes.
9898

99-
### Services
100-
101-
- [PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/postgresql).
102-
- [Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/redis).
103-
- [React App](https://backend.starters.dev) - simple [frontend app](https://github.com/starters-dev/backend.starters.dev-website).
104-
105-
> more services will be added...
106-
107-
## Environment variables
99+
### Env variables
108100

109101
Current setup requires you to fill in `.env` file with variables that are used in services.
110102

111-
#### General
112-
113103
- `DOMAIN_NAME` - your registered domain.
114104
- `DO_AUTH_TOKEN` - Digital Ocean token that is going to be used for DNS challenge and generating https certificates. It's required by Traefik and they provide other options, you can find them [here](https://doc.traefik.io/traefik/https/acme/#providers). If you'd like to continue with Digital Ocean, then you can create a token in `Dashboard` -> `API` -> `Tokens/Keys`.
115105
- `ACME_EMAIL` - email that is used for [Let's Encrypt](https://letsencrypt.org) and `https` certificates.
116106
- `GITHUB_TOKEN` - `(optional)` github token for private repos.
117107

108+
### Services
109+
110+
- [PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/postgresql).
111+
118112
<details>
119-
<summary>PostgreSQL</summary>
113+
<summary>Env variables</summary>
120114

121115
- `POSTGRESQL_USERNAME` - username for PostgreSQL.
122116
- `POSTGRESQL_PASSWORD` - password for PostgreSQL.
123117
- `POSTGRESQL_DATABASE` - name of the database in PostgreSQL.
124118

125119
</details>
126120

121+
- [Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/redis).
122+
127123
<details>
128-
<summary>Redis</summary>
124+
<summary>Env variables</summary>
129125

130126
- `REDIS_PASSWORD` - password for Redis.
131127
- `REDIS_DISABLE_COMMANDS` - commands disabled from execution.
132128

133129
</details>
134130

131+
- [Plausible](https://plausible.io) - simple and privacy-friendly Google Analytics alternative
132+
135133
<details>
136-
<summary>Plausible</summary>
134+
<summary>Env variables</summary>
137135

138136
`.env` file:
139137

@@ -151,14 +149,26 @@ Current setup requires you to fill in `.env` file with variables that are used i
151149
152150
</details>
153151

152+
<details>
153+
<summary>Troubleshooting</summary>
154+
155+
- [ClickHouse] _Database plausible_events_db doesn't exist_. If you encounter this issue, check out [this comment](https://github.com/plausible/hosting/issues/49#issuecomment-1229183219) for the solution.
156+
157+
</details>
158+
159+
- [React App](https://backend.starters.dev) - simple [frontend app](https://github.com/starters-dev/backend.starters.dev-website).
160+
161+
> more services will be added...
162+
154163
## Enhancements
155164

156165
There are still some things I would like to add to the backend setup:
157166

158167
- [x] [PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity.
159168
- [x] [Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker.
160-
- [ ] [Plausible](https://plausible.io) - simple and privacy-friendly Google Analytics alternative. [Github repo](https://github.com/plausible/hosting).
169+
- [x] [Plausible](https://plausible.io) - simple and privacy-friendly Google Analytics alternative.
161170
- [ ] [GlitchTip](https://glitchtip.com) - open source reimplementation of Sentry error tracking platform.
171+
- [ ] [Cal.com](https://cal.com) - scheduling infrastructure for absolutely everyone. [Github repo](https://github.com/calcom/docker).
162172
- [ ] [Mattermost](https://mattermost.com) - open source platform for developer collaboration. [Github repo](https://github.com/starters-dev/mattermost).
163173
- [ ] [Taiga](https://www.taiga.io) - open source, self-hosted project management tool. [Github repo](https://github.com/starters-dev/taiga).
164174
- [ ] [Focalboard](https://focalboard.com) - open source, self-hosted alternative to Trello, Notion, and Asana. [Github repo](https://github.com/starters-dev/focalboard).

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -- getting docker-compose files
2-
DC_FILES="-f docker-compose.main.yml"
2+
DC_FILES="-f docker-compose.yml"
33
for F in `find ./services -maxdepth 1 -type f -name "docker-compose*.yml"`
44
do
55
DC_FILES="$DC_FILES -f $F "

services/docker-compose.plausible.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ services:
55
mail:
66
image: bytemark/smtp
77
restart: always
8+
labels:
9+
- "traefik.enable=false"
810

911
plausible_db:
1012
image: postgres:14-alpine
1113
restart: always
1214
volumes:
1315
- ./services/plausible/data:/var/lib/postgresql/data
1416
environment:
15-
- POSTGRES_PASSWORD=${PLAUSIBLE_POSTGRES_PASSWORD}
17+
- POSTGRES_PASSWORD=postgres
1618
labels:
1719
- "traefik.enable=false"
1820

@@ -38,8 +40,8 @@ services:
3840
- plausible_db
3941
- plausible_events_db
4042
- mail
41-
# ports:
42-
# - 8000:8000
43+
expose:
44+
- 8000
4345
env_file:
4446
- ./services/plausible/conf.env
4547
labels:
@@ -51,7 +53,6 @@ services:
5153
- "traefik.http.routers.plausible_tls.rule=Host(`plausible.${DOMAIN_NAME}`)"
5254
- "traefik.http.routers.plausible_tls.entryPoints=https"
5355
- "traefik.http.routers.plausible_tls.tls.certresolver=mydnschallenge"
54-
- "traefik.http.services.plausible.loadbalancer.server.port=8000"
5556

5657
volumes:
5758
db-data:

setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -- running services' bash files
2-
BASH_GENERAL_FILES="bash run/acme.sh; bash run/data.sh;"
2+
BASH_GENERAL_FILES="bash run/acme.sh;"
33
BASH_FILES=""
44
for F in `find ./services -maxdepth 2 -type f -name "index.sh"`
55
do

0 commit comments

Comments
 (0)