Closed drkui closed 2 years ago
Looks like you might need to docker-compose up -d
first 🤔
After trying docker-compose up -d
, I got:
[...]\finance>docker-compose up -d
Docker Compose is now in the Docker CLI, try `docker compose up`
Recreating finance-redis ...
Recreating finance-node ... done
Recreating finance-php ... done
Recreating finance-redis ... done
Recreating finance-web ... error
Recreating finance-mysql ... done
ade to access a socket in a way forbidden by its access permissions.
ERROR: for web Cannot start service web: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
ERROR: Encountered errors while bringing up the project.
[...]\finance>docker compose up
[+] Running 5/5
- Container finance-php Recreated 0.5s
- Container finance-mysql Recreated 3.2s
- Container finance-node Recreated 0.4s
- Container finance-redis Recreated 1.1s
- Container finance-web Recreated 0.2s
Attaching to finance-mysql, finance-node, finance-php, finance-redis, finance-web
finance-php | [21-Apr-2021 04:51:16] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
finance-php | [21-Apr-2021 04:51:16] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
finance-php | [21-Apr-2021 04:51:16] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
finance-php | [21-Apr-2021 04:51:16] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
finance-php | [21-Apr-2021 04:51:16] NOTICE: fpm is running, pid 1
finance-php | [21-Apr-2021 04:51:16] NOTICE: ready to handle connections
finance-mysql | 2021-04-21 04:51:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
finance-mysql | 2021-04-21 04:51:17+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
finance-mysql | 2021-04-21 04:51:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.21-1debian10 started.
finance-mysql | 2021-04-21T04:51:18.049132Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21) starting as process 1
finance-mysql | 2021-04-21T04:51:18.061307Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
finance-mysql | 2021-04-21T04:51:18.454104Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
finance-mysql | 2021-04-21T04:51:18.537156Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
finance-redis | 1:C 21 Apr 04:51:18.608 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
finance-redis | 1:C 21 Apr 04:51:18.608 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
finance-redis | 1:C 21 Apr 04:51:18.608 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
finance-redis | 1:M 21 Apr 04:51:18.609 * Running mode=standalone, port=6379.
finance-redis | 1:M 21 Apr 04:51:18.609 # Server initialized
finance-redis | 1:M 21 Apr 04:51:18.609 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
finance-redis | 1:M 21 Apr 04:51:18.609 * Ready to accept connections
The new 'docker compose' command is currently experimental. To provide feedback or request new features please open issues at https://github.com/docker/compose-cli
Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
@drkui looks like you're running on a system which already has a webserver running. Please turn off the other web servers running on port 80 or change the port being used in the docker-compose.yml file.
As noted in the wiki, you must not have any other program running on ports 80, 3306, and 6379 by default.
@austinkregel Thanks, I completely forgot there was a blank/test HTTP site running. Once it was stopped I was able to successfully run the docker-compose up -d
and docker exec -it finance-php composer install
commands.
Running docker run -it -v "
pwd:/app" -w /app node yarn
still resulted in the error:
docker: Error response from daemon: create `pwd`: "`pwd`" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
Are you running this on a Linux/Mac system? Or is this being ran on windows? 🤔
You may need to use the full file path there instead of using pwd
.
docker run -it -v "/home/usrname/path/to/finance:/app" -w /app node yarn
I'm running this on Windows 10 Pro x64.
Thank you for the tip, after some googling I was able to run the following command:
docker run -it -v "%cd%:/app" -w /app node yarn
That allowed me to run the rest of the commands in the guide up until:
docker exec -it finance-php php artisan migrate
yarn install v1.22.5nance>docker run -it -v "%cd%:/app" -w /app node yarn
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning file-loader@2.0.0: Invalid bin field for "file-loader".
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @babel/plugin-proposal-optional-chaining@7.11.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/plugin-proposal-optional-chaining > @babel/plugin-syntax-optional-chaining@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > @enrian/vue-pikaday@1.2.0" has unmet peer dependency "pikaday@^1.8.0".
warning "vue-responsive-dash > @interactjs/actions@1.9.22" has unmet peer dependency "@interactjs/core@1.9.22".
warning "vue-responsive-dash > @interactjs/actions@1.9.22" has unmet peer dependency "@interactjs/utils@1.9.22".
warning "vue-responsive-dash > @interactjs/auto-start@1.9.22" has unmet peer dependency "@interactjs/core@1.9.22".
warning "vue-responsive-dash > @interactjs/auto-start@1.9.22" has unmet peer dependency "@interactjs/utils@1.9.22".
warning " > browser-sync-webpack-plugin@2.0.1" has unmet peer dependency "webpack@^1 || ^2 || ^3".
warning " > sass-loader@7.3.1" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
error An unexpected error occurred: "EEXIST: file already exists, copyfile '/usr/local/share/.cache/yarn/v6/npm-luxon-1.25.0-integrity/node_modules/luxon/CHANGELOG.md' -> '/app/node_modules/luxon/CHANGELOG.md'".
info If you think this is a bug, please open a bug report with the information provided in "/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[...]\finance>copy .env.example .env
Overwrite .env? (Yes/No/All): all
1 file(s) copied.
[...]\finance>docker exec -it finance-php php artisan storage:link
The [/var/www/html/public/storage] link already exists.
The links have been created.
[...]\finance>docker exec -it finance-php php artisan key:generate
Application key set successfully.
[...]\finance>docker exec -it finance-php php artisan migrate
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = testing and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
+39 vendor frames
40 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
I didn't change any of the values in the .env file except for the PLAID_*
variables. Could it be that I can't leave the DB/Redis/Mail variables in their default values?
The default ENV will only work for pipelines 😅I'm currently updating the code base to use Laravel 8 and this is something I noticed as well in my testing 😅 Here's the "real" .env.example
You'd really only need to update your DB_* configuration bit to match 😄
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
BROADCAST_DRIVER=database
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PLAID_ENV=sandbox
PLAID_SECRET=
PLAID_CLIENT_ID=
PLAID_LANGUAGE=en
PLAID_COUNTRY_CODES=US
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
SLACK_WEBHOOK_URL=
DISCORD_TOKEN=
Thanks! I was able to complete the setup after using the above .env.example. The problem I'm getting now though is that nothing happens or pops up when I click on the "Link new account" button. 🤔
You'll need to check your console.log for errors.
You'll also need to sub in your plaid credentials.
Yup, I made sure I put in my Plaid creds in the .env file. This is what I'm seeing in the browser console log:
I suppose I should ask 🤔 Which branch did you check out when cloning the repo? Also, what's the actual response from the create-link-token endpoint?
Sorry, I'm not sure how to answer that, I'm not too experienced with Github to be honest. I just followed the Downloading and configuring finance (agnostic docs) guide for Windows, followed by Setting up the app (docker).
Here's the response: console-export-2021-5-3_23-32-3.txt
Here's what I have under the PLAID_*
variables in the .env file (info redacted):
And the keys on Plaid (info redacted):
My API version on Plaid, I noticed that it was previously at 2019-05-29, I have since changed it to 2020-09-14 just in case it mattered.
Okay, so by default when you clone the repo, it should be whatever's chosen by default :D (I wanted to make sure you didn't choose the experimental branch 😂 )
Looks like you have your .env
setup swapped. You're using your development
secret while the PLAID_ENV
is set to sandbox instead of development.
Update your PLAID_SECRET
value in your .env
file to match the secret for the respective environment from PLAID_ENV
(ie. if you're using the sandbox token have it set to sandbox, otherwise use your dev secret.)
Got it, thanks for the clarification. Looks like that did the trick to resolve that response, I swapped out sandbox for development, but I received another error.
This is the response I got:
XHRPOSThttp://localhost/api/plaid/create-link-token
[HTTP/1.1 500 Internal Server Error 808ms]
message "{\n \"display_message\": null,\n \"documentation_url\": \"https://plaid.com/docs/#create-link-token\",\n \"error_code\": \"INVALID_FIELD\",\n \"error_message\": \"client_name must be a non-empty string\",\n \"error_type\": \"INVALID_REQUEST\",\n \"request_id\": \"4zStSiTSaYQnSRs\",\n \"suggested_action\": null\n}"
exception "Exception"
file "/var/www/html/app/Services/HttpService.php"
line 138
trace [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
0 Object { file: "/var/www/html/app/Services/PlaidHttpService.php", line: 80, function: "request", … }
1 Object { file: "/var/www/html/app/Services/HttpService.php", line: 165, function: "request", … }
2 Object { file: "/var/www/html/app/Services/Banking/PlaidService.php", line: 267, function: "post", … }
3 Object { file: "/var/www/html/app/Http/Controllers/Plaid/CreateLinkTokenController.php", line: 13, function: "createLinkToken", … }
4 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php", line: 54, function: "__invoke", … }
5 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php", line: 45, function: "callAction", … }
6 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php", line: 239, function: "dispatch", … }
7 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php", line: 196, function: "runController", … }
8 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php", line: 685, function: "run", … }
9 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 128, function: "Illuminate\\Routing\\{closure}", … }
10 Object { file: "/var/www/html/app/Http/Middleware/CreateFreshApiToken.php", line: 40, function: "Illuminate\\Pipeline\\{closure}", … }
11 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
12 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php", line: 41, function: "Illuminate\\Pipeline\\{closure}", … }
13 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
14 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php", line: 44, function: "Illuminate\\Pipeline\\{closure}", … }
15 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
16 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php", line: 78, function: "Illuminate\\Pipeline\\{closure}", … }
17 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
18 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php", line: 49, function: "Illuminate\\Pipeline\\{closure}", … }
19 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
20 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php", line: 116, function: "Illuminate\\Pipeline\\{closure}", … }
21 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php", line: 62, function: "handleStatefulRequest", … }
22 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
23 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php", line: 37, function: "Illuminate\\Pipeline\\{closure}", … }
24 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
25 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php", line: 67, function: "Illuminate\\Pipeline\\{closure}", … }
26 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
27 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 103, function: "Illuminate\\Pipeline\\{closure}", … }
28 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php", line: 687, function: "then", … }
29 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php", line: 662, function: "runRouteWithinStack", … }
30 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php", line: 628, function: "runRoute", … }
31 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php", line: 617, function: "dispatchToRoute", … }
32 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", line: 165, function: "dispatch", … }
33 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 128, function: "Illuminate\\Foundation\\Http\\{closure}", … }
34 Object { file: "/var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php", line: 60, function: "Illuminate\\Pipeline\\{closure}", … }
35 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
36 Object { file: "/var/www/html/vendor/fideloper/proxy/src/TrustProxies.php", line: 57, function: "Illuminate\\Pipeline\\{closure}", … }
37 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
38 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", line: 21, function: "Illuminate\\Pipeline\\{closure}", … }
39 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
40 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php", line: 21, function: "Illuminate\\Pipeline\\{closure}", … }
41 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
42 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php", line: 27, function: "Illuminate\\Pipeline\\{closure}", … }
43 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
44 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php", line: 63, function: "Illuminate\\Pipeline\\{closure}", … }
45 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 167, function: "handle", … }
46 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php", line: 103, function: "Illuminate\\Pipeline\\{closure}", … }
47 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", line: 140, function: "then", … }
48 Object { file: "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php", line: 109, function: "sendRequestThroughRouter", … }
49 Object { file: "/var/www/html/public/index.php", line: 55, function: "handle", … }
I'm honestly not sure what the issue is 😅
Looking at the error, I see it says
"error_message": "client_name must be a non-empty string"
Which means to me it there's still some configuration issue 🤔
Closing due to inactivity.
Hi, I'm following the documentation here: https://github.com/austinkregel/finance/wiki/Setting-up-the-app-(docker)
I'm having trouble with some of the commands:
Any advice on what I should do next or what I'm doing wrong? Thanks!