Skip to content

Commit 62bee45

Browse files
authored
Merge pull request #105 from sezanzeb/chore
Chore
2 parents a428f44 + 67fa72e commit 62bee45

35 files changed

Lines changed: 4557 additions & 39137 deletions

.github/workflows/main.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,17 @@ jobs:
5252
with:
5353
cmd: install
5454

55-
# - name: test
56-
# uses: borales/actions-yarn@v3.0.0
57-
# with:
58-
# cmd: backend::test
55+
- name: test
56+
uses: borales/actions-yarn@v3.0.0
57+
with:
58+
cmd: backend::test
5959

60-
#- name: codecov
61-
# uses: borales/actions-yarn@v3.0.0
62-
# with:
63-
# cmd: backend::codecov
60+
- name: codecov
61+
# using borales/actions-yarn@v3.0.0 breaks running ./codecov
62+
run: |
63+
curl -Os https://cli.codecov.io/latest/linux/codecov
64+
sudo chmod +x codecov
65+
yarn backend::codecov
6466
6567
frontend:
6668
runs-on: ubuntu-latest
@@ -84,15 +86,18 @@ jobs:
8486
with:
8587
cmd: frontend::typecheck
8688

87-
- name: test
88-
uses: borales/actions-yarn@v3.0.0
89-
with:
90-
cmd: frontend::test
91-
92-
- name: codecov
93-
uses: borales/actions-yarn@v3.0.0
94-
with:
95-
cmd: frontend::codecov
89+
# Frontend tests are broken, incompatible with react 19 and should be rewritten
90+
# - name: test
91+
# uses: borales/actions-yarn@v3.0.0
92+
# with:
93+
# cmd: frontend::test
94+
95+
# - name: codecov
96+
# # using borales/actions-yarn@v3.0.0 breaks running ./codecov
97+
# run: |
98+
# curl -Os https://cli.codecov.io/latest/linux/codecov
99+
# sudo chmod +x codecov
100+
# yarn frontend::codecov
96101

97102
build:
98103
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ db/
77
*.swp
88
frontend/bundle/
99
.vscode/
10+
.idea/

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ services:
8484
# tilt doesn't need root privileges on the database,
8585
# therefore a regular user account and a random root
8686
# password is the better choice
87-
- MYSQL_RANDOM_ROOT_PASSWORD=yes
87+
- MARIADB_RANDOM_ROOT_PASSWORD=yes
8888
# these two don't need to be called "tilt", but this is
8989
# a tilt example
90-
- MYSQL_DATABASE=tilt
91-
- MYSQL_USER=tilt
90+
- MARIADB_DATABASE=tilt
91+
- MARIADB_USER=tilt
9292
# genereate a password, as this one is shown publicly
9393
# in this repository
94-
- MYSQL_PASSWORD=this_is_not_secure_generate_something
94+
- MARIADB_PASSWORD=this_is_not_secure_generate_something
9595

9696
tilt:
9797
image: hackaburg/tilt
@@ -167,13 +167,13 @@ server {
167167
Since database takes a brief moment for its setup, start with:
168168

169169
```bash
170-
$ docker-compose up tilt_mariadb
170+
$ docker compose up tilt_mariadb
171171
```
172172

173173
Then wait for MariaDB to accept incoming connections. Once this is done, you can stop `docker-compose` and start up everything with:
174174

175175
```bash
176-
$ docker-compose up
176+
$ docker compose up
177177
```
178178

179179
Depending on your setup, you might want to append the `-d` flag to run the containers in the background.
@@ -187,7 +187,7 @@ With everything up and running, you usually want to configure tilt. For this, yo
187187
Since you have access to the server running tilt, you can spawn a shell in the tilt container and invoke the [usermod script](backend/src/usermod.ts). Please note that we're using `node:alpine` as a base image and therefore don't ship Bash. This script takes two arguments, the email of the user you want to change, as well as the group you want to assign to this user. To assign the `root` group to `you@example.com`, run:
188188

189189
```bash
190-
$ docker-compose exec tilt sh
190+
$ docker compose exec tilt sh
191191
node@container:/app$ node backend/usermod.js you@example.com root
192192
```
193193

@@ -271,21 +271,29 @@ If you found a bug or have an idea for a feature, simply [submit an issue](https
271271
The tilt repository ships with a [docker-compose.yml](docker-compose.yml), which includes a sample setup with MariaDB, the test SMTP server [MailDev](https://github.com/maildev/maildev) and phpMyAdmin. To mimic the proxy'd setup, it also includes build instructions for a tilt container, as well as an NGINX container. You usually only need `db`, `phpmyadmin` and `maildev`, therefore it's sufficient to start them using:
272272

273273
```bash
274-
$ docker-compose up db phpmyadmin maildev
274+
docker compose up db phpmyadmin maildev
275275
```
276276

277-
For local development, the backend supports reading `.env` files. Refer to [`.env.example`](backend/.env.example) for such a configuration and match the ports from the Docker Compose configuration. You can then start the backend using:
277+
For local development, the backend supports reading `.env` files. Refer to [`.env.example`](backend/.env.example) for such a configuration and match the ports from the Docker Compose configuration.
278278

279279
```bash
280-
$ yarn backend::start
280+
cp backend/.env.example backend/.env
281281
```
282282

283-
As the frontend is built in modern React, we use [Webpack](https://webpack.js.org) and its devserver to develop. The backend runs on a different port, so we need to tell the frontend how to reach the backend. This can be done through the `API_BASE_URL` environment variable. To start the frontend devserver with the backend listening on port 3000, simply provide it using:
283+
You can then start the backend using:
284284

285285
```bash
286-
$ API_BASE_URL=http://localhost:3000/api yarn frontend::start
286+
yarn backend::start
287287
```
288288

289+
As the frontend is built in modern React, we use [Webpack](https://webpack.js.org) and its devserver to develop. The frontend is available at localhost:8080. The backend runs on a different port, so we need to tell the frontend how to reach the backend. This can be done through the `API_BASE_URL` environment variable. To start the frontend devserver with the backend listening on port 3000, simply provide it using:
290+
291+
```bash
292+
API_BASE_URL=http://localhost:3000/api yarn frontend::start
293+
```
294+
295+
After registering, open localhost:8082 to view the verification mail.
296+
289297
We also provide a set of utility scripts in our [package.json](package.json)'s `script` section, such as linting, formatting and type-checking.
290298

291299
### Building images

backend/.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ LOG_FILENAME=tilt.log
88

99
# mail config
1010
MAIL_HOST=localhost
11-
MAIL_PORT=25
11+
MAIL_PORT=2525 # use 465 for encryption
1212
MAIL_USERNAME=root@localhost
1313
MAIL_PASSWORD=password
1414

1515
# mariadb database connection config
1616
DATABASE_NAME=tilt
17-
DATABASE_USERNAME=root
18-
DATABASE_PASSWORD=password
17+
DATABASE_USERNAME=tilt
18+
DATABASE_PASSWORD=this_is_not_secure_generate_something
1919
DATABASE_PORT=3306
2020
DATABASE_HOST=localhost
2121

0 commit comments

Comments
 (0)