Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit 1c12631

Browse files
authored
Merge pull request #17 from HellPat/nix-shell
Uses nix-shell instead of devenv.sh
2 parents 7b86e19 + 98a434f commit 1c12631

16 files changed

Lines changed: 132 additions & 295 deletions

File tree

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ APP_SECRET=aebd59d3c9b54539553c1ea79045c817
2727
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
2828
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
2929
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=15&charset=utf8"
30-
DATABASE_URL="mysql://app:app@127.0.0.1:13309/app?erverVersion=8.0.35&charset=utf8"
30+
DATABASE_URL="mysql://user:pass@localhost/app?unix_socket=${MYSQL_UNIX_PORT}&serverVersion=8.0.35&charset=utf8"
3131
###< doctrine/doctrine-bundle ###
3232

3333
###> symfony/messenger ###
3434
# Choose one of the transports below
3535
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
3636
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
3737
# MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
38-
MESSENGER_TRANSPORT_DSN=redis://localhost:16379/messages
38+
MESSENGER_TRANSPORT_DSN=redis://${REDIS_SOCKET}?stream=messages
3939
###< symfony/messenger ###
4040

4141
###> symfony/mailer ###

.envrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,9 @@ devenv.local.nix
4646
phpstan.neon
4747
###< phpstan/phpstan ###
4848

49-
docker/
49+
storage/mysql/data
50+
storage/redis/data
51+
*.sock
52+
*.sock.lock
53+
*.pid
5054
node_modules/

.rr.dev.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ reload:
44
interval: 1s
55
services:
66
http:
7-
patterns: [ ".php", ".env", ".env.local", ".yaml", ".yml" ]
7+
dirs: [""]
88
ignore: [ "var/" ]
9+
patterns: [ ".php", ".env", ".env.local", ".yaml", ".yml" ]
10+
recursive: true
911

1012
server:
1113
command: "php public/index.php"
@@ -23,6 +25,8 @@ http:
2325

2426
logs:
2527
mode: development
28+
level: debug
29+
encoding: json
2630
channels:
2731
http:
2832
level: info

Justfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
develop:
2-
devenv up
2+
overmind start
33

44
build:
5+
#!/usr/bin/env bash
6+
set -euxo pipefail
7+
# initialize mysql when the directory does not exist
8+
if [ ! -d $MYSQL_DATADIR ]; then
9+
mkdir -p ${MYSQL_DATADIR}
10+
mysqld --datadir=${MYSQL_DATADIR} --initialize
11+
fi
12+
echo "STRIPE_SIGNING_SECRET=$(stripe listen --print-secret)" > .env.local
513
tailwindcss -i assets/styles/app.css -o assets/styles/app.tailwind.css
614

715
rebuild:

Procfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# TODO: handle dependencies between services by using a wait-for.sh script.
2+
3+
mysql: mysqld --datadir=${MYSQL_DATADIR} --init-file=${MYSQL_HOME}/init.sql --skip-networking
4+
redis: redis-server storage/redis/redis.conf
5+
symfony: rr serve -p -c .rr.dev.yaml --debug
6+
7+
# TODO: rethink limits and restarts.
8+
# I set a time limit and a limit of jobs to process, to easy using xdebug.
9+
# Xdebug listening must be started in the IDE, and the long running process must be restarted to take effect.
10+
symfony-message-consumer: symfony run --watch=config,src,vendor bin/console messenger:consume async --limit=10 --time-limit=300 --no-interaction -vv
11+
12+
stripe: stripe listen --skip-verify --forward-to localhost:8000/webhook/stripe
13+
tailwindcss: tailwindcss -i assets/styles/app.css -o assets/styles/app.tailwind.css --watch

assets/styles/app.tailwind.css

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
2+
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
33
*/
44

55
/*
@@ -32,11 +32,9 @@
3232
4. Use the user's configured `sans` font-family by default.
3333
5. Use the user's configured `sans` font-feature-settings by default.
3434
6. Use the user's configured `sans` font-variation-settings by default.
35-
7. Disable tap highlights on iOS
3635
*/
3736

38-
html,
39-
:host {
37+
html {
4038
line-height: 1.5;
4139
/* 1 */
4240
-webkit-text-size-adjust: 100%;
@@ -46,14 +44,12 @@ html,
4644
-o-tab-size: 4;
4745
tab-size: 4;
4846
/* 3 */
49-
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
47+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
5048
/* 4 */
5149
font-feature-settings: normal;
5250
/* 5 */
5351
font-variation-settings: normal;
5452
/* 6 */
55-
-webkit-tap-highlight-color: transparent;
56-
/* 7 */
5753
}
5854

5955
/*
@@ -125,10 +121,8 @@ strong {
125121
}
126122

127123
/*
128-
1. Use the user's configured `mono` font-family by default.
129-
2. Use the user's configured `mono` font-feature-settings by default.
130-
3. Use the user's configured `mono` font-variation-settings by default.
131-
4. Correct the odd `em` font sizing in all browsers.
124+
1. Use the user's configured `mono` font family by default.
125+
2. Correct the odd `em` font sizing in all browsers.
132126
*/
133127

134128
code,
@@ -137,12 +131,8 @@ samp,
137131
pre {
138132
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
139133
/* 1 */
140-
font-feature-settings: normal;
141-
/* 2 */
142-
font-variation-settings: normal;
143-
/* 3 */
144134
font-size: 1em;
145-
/* 4 */
135+
/* 2 */
146136
}
147137

148138
/*

config/packages/monolog.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ when@dev:
77
handlers:
88
main:
99
type: stream
10-
path: "%kernel.logs_dir%/%kernel.environment%.log"
11-
level: debug
10+
path: php://stderr
11+
level: info
1212
channels: ["!event"]
1313
# uncomment to get logging in your browser
1414
# you may have to allow bigger header sizes in your Web server configuration

devenv.lock

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)