« first day (2 days earlier)    last day (31 days later) » 

Wes
1:40 PM
redis_1          | 1:M 03 Aug 11:19:43.529 * DB loaded from disk: 0.000 seconds
redis_1          | 1:M 03 Aug 11:19:43.529 * Ready to accept connections
: not found      | /var/app/docker/installer/entrypoint.sh: 1: /var/app/docker/installer/entrypoint.sh:
installer_1      | /var/app/docker/installer/entrypoint.sh: 2: set: Illegal option -
: not found      | /var/app/docker/php_fpm/entrypoint.sh: 1: /var/app/docker/php_fpm/entrypoint.sh:
php_fpm_1        | /var/app/docker/php_fpm/entrypoint.sh: 2: set: Illegal option -
@Danack
 
that looks similar to the problem I'm looking at.
stuff like:
php vendor/bin/configurate \
    -p server_config.php \
    docker/varnish/config/default.vcl.php \
    docker/varnish/config/default.vcl \
    $ENV_TO_USE
is being run incorrectly
 
Wes
i think \ newline doesn't actually work on windows
 
possibly - but it's meant to be run inside the container, I think?
 
Wes
i have no idea
 
oh......it's the symlinks that compose uses to map from php scripts in each vendor directory, into the vendor/bin directory.
they've all been turned into txt files apparently.
 
Wes
2:20 PM
any news about that?
 
yeah, fixed that, found the next issue....I should have checked it came up correctly already on a windows box, just poking various little bits to make it work.
also - what's the command to force delete a directory in windows please...
I've forgotten, and there's a directory that doesn't want to go away...
 
Wes
@Danack rmdir some_dir /s /q ?
/q is quiet
 
ty.
 
Wes
/S Removes all directories and files in the specified directory in addition to the directory itself. It is used to remove a directory tree.
/Q Quiet mode, do not ask if ok to remove a directory tree with /S.
 
So, I'm guessing people never check in the vendor directory when developing a PHP project on windows?
Although it's not the best practice on mac, it's not entirely unreasonable...but it doesn't seem to work cross platform to windows due to the symlinking getting 'detached'.
 
Wes
2:32 PM
no, why would they?
never heard of that. i thought composer was meant to avoid that precisely
they commit the lock if they want the locked dependencies. or i didn't understand the question?
 
It's a tradeoff. it's quite nice having everything be a single deployable thing for when you haven't setup your CI tools yet.
it's also nice if you have junior JS developers who don't need to know about PHP packages.
probably only appropriate on projects where you aren't using a big framework that has releases every week.
as that would make git history be huge.
 
Wes
and a mess :B
 
2:58 PM
cool, sorry about that should be fixed now. New config file sent to you with small tweak.
 
Wes
sourcetree crashed while pulling
goddamnit
 
yeah, I love sourcetree, but at the same time "baby why you make me hurt you?"
 
Wes
i have this theory that technology is sentient
and it hates me
E: Failed to fetch https://packages.sury.org/php/pool/main/i/icu/libicu64_64.1-0.1+0~20190410090943.5+stretch~1.gbp38f694_amd64.deb GnuTLS recv error (-9): A TLS packet with unexpected length was received.
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
started again
i had connection problems for some seconds
 
3:15 PM
do:
docker-compose build --no-cache
this is one thing that's shite about docker. If a build step fails, sometimes docker doesn't notice and so keeps trying to use the result of that build step.
Also once the guy that maintains the PHP repos for debian changed domain name without warning....and the previous build steps had cached the other domain name, so everything suddenly started failing to build.
 
Wes
then docker-compose up --build ?
 
yep
 
Wes
redis_1          | 1:M 03 Aug 15:27:37.310 * DB loaded from disk: 0.001 seconds
redis_1          | 1:M 03 Aug 15:27:37.310 * Ready to accept connections
: not found      | /var/app/docker/installer/entrypoint.sh: 1: /var/app/docker/installer/entrypoint.sh:
installer_1      | /var/app/docker/installer/entrypoint.sh: 2: set: Illegal option -
: not found      | /var/app/docker/php_fpm/entrypoint.sh: 1: /var/app/docker/php_fpm/entrypoint.sh:
php_fpm_1        | /var/app/docker/php_fpm/entrypoint.sh: 2: set: Illegal option -
 
3:32 PM
do you have any git config that might alter newlines on checkout?
can you tell me how many bytes the file: docker/installer/entrypoint.sh is on your computer?
 
Wes
@Danack 226
@Danack i think i have binary transfer. wait let mecheck
 
that file is 172 bytes for me...
 
Wes
fixed line endings i think
wait
 
If they were altered, you may need to reset or check the project out again?
 
Wes
3:48 PM
yes i did pull again
but the file is 210 bytes now
i checked the line endings, it's just \n, not windows
is that correct?
210 sorry
 
check which file you're looking at: docker/installer/entrypoint.sh ?
 
Wes
correct
 
still 172 bytes for me...
oh -but github says 210
yeah. Trying doing docker-compose up --build then?
 
Wes
i did build
maybe wasn't necessary?
it's almost finished tho
 
Not sure . fyi everything that is inside entrypoint.sh is run on container bootup. Everything else in the Dockerfile are run when the container is built.
 
Wes
3:55 PM
but is it normal that i have to download every linux that was ever created
what happens if i get rid of --no-cache ?
just ftr
did up --build
let's see
 
you only need to use --no-cache if you suspect a problem with the boxes.
we also had it setup on our CI tool to do that every morning so that the deployed containers would always be up-to-date for each day.
 
Wes
it's doing composer install so that worked
 
cool.
 
Wes
installer_1 | + sh buildSassToCss.sh
: not found | buildSassToCss.sh: 2: buildSassToCss.sh:
installer_1 | buildSassToCss.sh: 3: set: Illegal option -
opensourcefees_installer_1 exited with code 2
is that wrong?
 
@Wes that file has also had it's line ending altered I think.
> set: Illegal option
 
Wes
4:02 PM
i don't think it's possible i pulled again
 
that's from the line being changed from set -e\n to set -e\R\n
 
Wes
in what file? buildSasstoCss?
 
check the file size against github.com/Danack/OpenSourceFees/blob/master/buildSassToCss.sh should be 332 Bytes
yes, that file.
 
Wes
line endings are wrong but i have no idea why
 
I think I can fix what you're seeing by using a gitattributes file. going for a look.
yeah - apparently adding a .gitattributes file with:
* text=false

# Never modify line endings of our bash scripts
*.sh -crlf
 
Wes
4:15 PM
i deleted all files in the repo and pulled again and now the file endings are correct
 
computers eh?
 
Wes
now redoing the docker thing -__-
i saved the vendor folder. will i be able to use it without having to reinstall all the things?
 
should do?
tbh I really don't understand how the file symlinks get persisted both inside the container and on the host windows file system.
as they are not compatible things....so it's slightly magic.
 
Wes
the line ending thing is much more stupid than tabs vs spaces
i have no idea why software even cares about that
having a coffee while installs docker. brb
 
I think when git was created, quite a few windows things still have problems with files that only had \n file endings.....but it's not relevant now.
 
Wes
4:31 PM
vendor did not work :(
@Danack i think everything worked but i am still getting Stripe client not setup for project.
 
I'll look at setting the cache directory for composer so that it's faster...
can you look at the output of the installer container and see if it has an error message on it?
Or can you run:
docker exec -it opensourcefees_php_fpm_1 php cli.php seed:initial
(you might need to change the name of the container depending on whether it's called that on your system)
which you can find with docker ps
 
Wes
4:57 PM
@Danack varnish_1 | Could not open input file: vendor/bin/configurate
damn that was hard to find
 
@Wes has the installer finished running?
 
Wes
yes
 
can you ctrl+c and then launch them again please.
it will give that error on the first run, as the file has't been installed yet.
 
Wes
Stripe client not setup for project.
no change
 
ok so run:
docker exec -it opensourcefees_php_fpm_1 php cli.php seed:initial
you might need to change the name of the container depending on whether it's called that on your system)
which you can find with docker ps
 
Wes
5:00 PM
from another window?
 
yes, another cli window
 
Wes
@Danack gives me an empty line
and then goes back to the prompt
 
cool.
does that make the project appear? if not:
docker exec -it opensourcefees_php_fpm_1 sh resetDB.sh
will delete the whole DB and re-init it from scratch.
 
Wes
No it doesnt, also: There was a problem connecting to the database: SQLSTATE[HY000] [2002] Connection refused
Phinx by Rob Morgan - https://phinx.org. 0.8.1

using config file ./phinx.yml
using config parser yaml
using migration paths
- /var/app/db/migrations
using seed paths
warning no environment specified, defaulting to: development
using adapter mysql
using database osf

In MysqlAdapter.php line 115:

There was a problem connecting to the database: SQLSTATE[HY000] [2002] Connection refused
 
yep. one mo....
I pushed a fix for that to master - the difference is github.com/Danack/OpenSourceFees/commit/…
btw it's safe to pull without bringing the containers down....most of the time.
 
Wes
5:09 PM
it did the reset now but still no change
== 20190728132131 ProjectInfo: reverting
== 20190728132131 ProjectInfo: reverted 0.4003s

== 20190715183611 InvoiceRecording: reverting
== 20190715183611 InvoiceRecording: reverted 0.3833s

== 20190710122307 Payments: reverting
== 20190710122307 Payments: reverted 0.7498s

== 20190706123654 StripeCheckout: reverting
== 20190706123654 StripeCheckout: reverted 0.1838s

== 20190612135107 StripeConnect: reverting
== 20190612135107 StripeConnect: reverted 0.1736s

== 20190612092138 ProjectsForUser: reverting
Stripe client not setup for project.
still getting this tho
 
that looks like it's doing the reset okay...does it not then say migrating stuff?
 
Wes
no
 
lets run the individual lines to....
 
Wes
Phinx by Rob Morgan - phinx.org. 0.8.1

using config file ./phinx.yml
using config parser yaml
using migration paths
 - /var/app/db/migrations
using seed paths
using environment internal
using adapter mysql
using database osf

 == 20190728132131 ProjectInfo: reverting

 == 20190728132131 ProjectInfo: reverted 0.4493s

 == 20190715183611 InvoiceRecording: reverting
 == 20190715183611 InvoiceRecording: reverted 0.4739s

 == 20190710122307 Payments: reverting
 == 20190710122307 Payments: reverted 0.5255s
 
k - so the DB is there.
 
Wes
5:15 PM
that's all i get
 
can you run:
 
Wes
and i am getting the same thing also in the installer in the other cmd
 
docker exec -it opensourcefees_php_fpm_1 php cli.php seed:initial
 
Wes
empty line, then goes back to prompt
 
as that's the final line in the resetDB.sh file that actually seeds the db.
 
Wes
5:17 PM
need to go out for a bit, less than an hour, before shops close
 
np - laters.
 
 
1 hour later…
Wes
6:18 PM
back @Danack
 
I'm kind of confused - if that command runs without error...the data should be there.
Can you go to http://local.app.opensourcefees.com:8000/projects/Imagick which skips the varnish cache, to see if that makes it behave?
 
Wes
is this correct?
 
yes.
I know it looks crap - that's the one I need to tidy up before asking you to do polish. The other one is: local.admin.opensourcefees.com/invoices/1/render
back 5 mins.
 
Wes
that doesn't load
 
6:35 PM
what's it do instead? an do you have that domain in your hosts file?
 
Wes
added
user pass?
 
it's in Osf\app and its"
const TEST_ADMIN_USERNAME = "admin@example.com";
const TEST_ADMIN_PASSWORD = 'password12345';
 
Wes
@Danack ok that loads
 
Cool. so....I need to write a lot of words about the purpose of the site, both for end consumers, and for you to see why certain things are like how they are. The short version is this:
The whole site is a test for whether making it trivial to pay for open source actually results in people paying for open source.
The payment pages don't need to try and convince people that they should pay for open source, but just that if someone has come to the site, then they want to pay something, and to make that as easy as possible.
The two payment mechanism are credit card (through stripe) and purchase order -> invoice.
 
Wes
i see
 
6:42 PM
a lot of people won't know what purchase orders are, or why they need one to get an invoice, so I need to write some words for that for the payment page, which will influence the design. Hence, if you can look at making the invoice not look like I designed it first, that would great.
The invoice page is set to A4 and I'm using chrome headless to print them to PDF, so the design that they will be should be exactly as it is on that example page.
 
Wes
like, what should i do? change font, set paddings, do something else?
 
So currently the things I know are wrong are:
* the 'Unit Price' text is squished.
* the columns feel like they are weighted wrong.
* The text for the name probably should be top aligned to the cell.
I'll send you some example ones that to me appear more professional via email. I think it's little things like 'Date:' being bold on most of the examples makes me think when I look at them "hey, this is an invoice from an accounts department that needs to be paid", rather than "this is something fake that somebody mocked up".
tbh, the biggest thing might just be changing the font to something more appropriate, and aligning the bank details so they're readable.
Does that make sense?
 
Wes
7:01 PM
yes
how do i create a file i can access directly through browser? it's the xdebug validation thingy that phpstorm installs
does the vm have an ip, right?
 
the public directory for the admin is in ./OpenSourceFees/admin/public
btw if you want to connect to xdebug, that's on port 8001 in case you hadn't noticed that.
 
Wes
yes i did notice that but it's not working :B
doesn't stop at the breakpoints
Validation script will be created in '...\OpenSourceFees\admin\public' directory. Files in the directory should be accessible by 'http://local.admin.opensourcefees.com:8001/admin/public/file_name' request. Caused by: "null"
is the url correct?
 
no - just / is the public file.
tbh I don't normally go through that validation file.
if you edit docker/php_fpm_debug/xdebug.ini to set
xdebug.remote_autostart=1
xdebug.remote_host=host.docker.internal,
then start phpstorm 'listening' for debug requests, there is a good chance it will just work.
 
Wes
xdebug.remote_host=10.254.254.254
this was the problem probably
 
yeah....I didn't talk you through it, as setting up a new localhost on windows is annoying, but on a mac setting up a loopback address of 10.254.254.254 avoided lots of little issues for me.
 
Wes
7:09 PM
do i need to do anything after i change xdebug.ini?
 
restart the containers...
aka ctrl+c then docker-compose up again
 
Wes
ok ididit
it's the first, possibly?
 
no it should be ./OpenSourceFees/admin/public/index.php
you can skip that step, then edit the file mapping for the whole server, rather than just one bit.
/var/app maps to the root of ./OpenSourceFees/
 
Wes
ffs
 
yeah. it's annoying that this stuff doesn't just work out of the box for PHPStorm (or possibly that it's not so easy to setup so that it does).
 
Wes
7:22 PM
do i even need path mapping
 
if you want to set breakpoints or step through the code.
tbh, not sure what you're trying to do with xdebug, other than maybe have it ready for when you need it
 
Wes
Remote file path '/var/app/injectionParams/admin.php' is not mapped to any file path in project
wheres that file?
i am a bit confused
 
it's in injectionParams/admin.php
from the root.
if you can map Danack\OpenSourceFees to /var/app, then delete any other mappings for the 'server', it should find everything.
 
Wes
ok i did it
\o/
 
\o/
 
Wes
8:13 PM
i finally stepped into relevant code @Danack :B \Osf\AdminController\Invoices::renderInvoice
okay
 
let the 'wtf is this crap's begin!
 
Wes
explain me something pls. i see you guys use http messages to store anything, not just http related stuff. i don't. why am i wrong? :B
 
sorry - not sure what you're referring to at all. example?
 
Wes
after you solve the route, you save the info in the $request object
right?
 
the route info? Yes, but only because the Slim framework does that and I wasn't able to work around that directly.
but I'm also not using the pure slim routing dispatcher - theres a thing that sits after slim and effectively intercepts the dispatching and passes it through Auryn for all the DI to be done.
I'd prefer to go directly from matching the route to dispatching, but that wasn't possible in Slim.
Though possibly you might be talking about stuff else....
 
Wes
8:27 PM
no that
 
yeah, it's crap. but the frameworks do it as a way of pretending that they're not storing global state.
 
Wes
why you use slim tho? i thought auryn and kinda things would be a replacement for that
 
the code for pulling together psr 7 stuff and dispatching middle wares correctly is entirely tedious.
using slim avoids all of that and lets me jump into the stuff I care about.
Also...a lot easier to tell to companies "I recommend the slim framework" rather than "I recommend my own custom framework".
 
Wes
i see. my "middlewares" are all crammed in an index.php file
or rather, i call them from there
they are not chained, i do the wiring in index.php
ah of printing stuff i know basically nothing @Danack
i'll figure it out as i try making changes
 
that's fine. the css for the 'paper' does work...or at least it worked okay for our last project. i.e. went from html screen to PDF with almost pixel precision.
 
Wes
9:08 PM
@Danack did you check with an attorney or something about this stuff. don't think this stuff would work for me, but i am a company
means my invoices must be correctly numbered, have the same style, etc
if i wasn't a company i think en.wikipedia.org/wiki/Withholding_tax this would be needed
 
@Wes yeah, I realise that some projects that already have the ability to generate invoices would need to generate their own invoices away from the platform.
apparently the laws for this are more tolerable in the UK than in other countries.
Germany in particular sounds 'fun':
> The law also articulates that if you send an invoice as an electronic document you have to agree on this in writing with the client in advance and that the invoice must be validated by an electronic signature or sent within a validated private electronic network.
wait, not fun, the other one; highly regulated.
 
Wes
9:26 PM
it's the same here in italy. it's all digital
and it's absolutely mandatory
i just found out. basically there is this platform where you can create an invoice, you need to sign it digitally and upload it in the platform, which then sends it to the invoice receiver, all with this stuff en.wikipedia.org/wiki/Certified_email
there is an API for the platform though, should be fairly easy to use because it's simple xml files
 
tbh - I'm probably going to focus on the UK ( as I'm here) and the US (as they have more money) first.
 
Wes
9:42 PM
sure, otherwise it's impossible every country is different
thanks again EU
anyway i just checked if the "donation" comes from anywhere but italy i can do paper
italy to italy i am forced to use the platform thingy
 
yeah.....freedom of movement for goods and services, but far too complicated unless you are a company big enough to pay for a team of ten lawyers.
see also, vat.
 

« first day (2 days earlier)    last day (31 days later) »