docker-compose.yml issue nodejs and mysql - mysql

I trying to dockerize my nodeJS api. Check out the following files :
.\package.json
{
"name": "test-api",
"version": "1.0.0",
"description": "TBD",
"scripts": {
"start": "node ./bin/www"
},
"keywords": [
"test",
"API"
],
"author": "test",
"dependencies": {
"bcrypt": "^2.0.1",
"bcrypt-promise": "^2.0.0",
"body-parser": "^1.18.3",
"debug": "^3.1.0",
"dotenv": "^6.0.0",
"express": "^4.16.3",
"jsonwebtoken": "^8.3.0",
"morgan": "^1.9.0",
"multer": "^1.3.1",
"mysql2": "^1.5.3",
"nodemailer": "^4.6.7",
"parse-error": "^0.2.0",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"sequelize": "^4.37.10",
"validator": "^10.4.0"
}
}
.\docker-compose.yml
version: '2'
services:
api:
build: .
ports:
- "4200:4200"
depends_on:
- db
environment:
- DATABASE_HOST=db
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
db:
build: ./db
.\Dockerfile
FROM node:8
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 4200
CMD [ "npm", "start" ]
.\db\Dockerfile
FROM mysql:latest
ENV MYSQL_ROOT_PASSWORD root
ENV MYSQL_DATABASE test_dev
ENV MYSQL_USER test-dev
ENV MYSQL_PASSWORD testapi
I get the following error when I do "docker-compose up"-
I'm pretty new to this, solution to solve this and few pointers on what to research more would help me a lot!

Try with this Dockerfile (avoid COPY *) and I recommend to use the absolute path in destination:
.\Dockerfile
FROM node:8
COPY package.json /usr/src/app
WORKDIR /usr/src/app
RUN npm install
COPY . .
EXPOSE 4200
CMD [ "npm", "start" ]

Related

Can't connect to flask app inside a docker container from host [duplicate]

This question already has answers here:
Deploying a minimal flask app in docker - server connection issues
(8 answers)
Closed 1 year ago.
I’m trying to run a Flask application and mysql database by running docker-compose up on my computer. The flask is running on port 5000.
if __name__ == "__main__":
app.run(port=5000, debug=True)
The docker container is responding properly when I use docker exec command. But I can't get any response from the host by using the url: http://localhost:5000.
The curl -X GET <url> command is giving the following output:
curl: (56) Recv failure: Connection reset by peer
The docker ps command is giving the following output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bffa59c471f6 customer_transaction_app "/bin/sh -c 'python …" About an hour ago Up About an hour 0.0.0.0:5000->5000/tcp customer_transaction_app_1
ad60c2830ac0 mysql "docker-entrypoint.s…" About an hour ago Up About an hour 33060/tcp, 0.0.0.0:32001->3306/tcp customertransaction_db_host
Here is the Dockerfile:
FROM python:3.8
EXPOSE 5000
COPY requirements.txt /app/requirements.txt
WORKDIR /app
RUN pip install -r requirements.txt
COPY . /app CMD
python main.py
Here is the docker-compose.yml file:
version: "2"
services:
app:
build: ./
depends_on:
- db
ports:
- "5000:5000"
db:
container_name: customertransaction_db_host
image: mysql
restart: always
ports:
- "32001:3306"
volumes:
- customertransaction-db-vol:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: customertransaction_db
MYSQL_USER: user
MYSQL_PASSWORD: 123456
volumes:
customertransaction-db-vol: {}
Both the containers reside inside a docker network customer_transaction_default. The docker network inspect command creates the following output:
[
{
"Name": "customer_transaction_default",
"Id": "4b5b20f503af0026a2f1ef185436c9a8e3d9c2ece690e93ece0e6b12f7821edb",
"Created": "2021-06-20T17:52:15.603679073+05:30",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.24.0.0/16",
"Gateway": "172.24.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"ad60c2830ac0f7e270daf03334ea8a8170200e92c2bc43492c378bd1d89cd3ac": {
"Name": "customertransaction_db_host",
"EndpointID": "de4597a1f58d711640f71a6169111f9842c7c5d74320825657a2518d07f36504",
"MacAddress": "02:42:ac:18:00:02",
"IPv4Address": "172.24.0.2/16",
"IPv6Address": ""
},
"bffa59c471f6762bb802fcee37db356cf2c7a59f4f88192e3546dd10ad9dbb2d": {
"Name": "customer_transaction_app_1",
"EndpointID": "a3ded03e28343921d799c0efc334034028821c231e1469d4359cd387c7f43f70",
"MacAddress": "02:42:ac:18:00:03",
"IPv4Address": "172.24.0.3/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
Since you are trying to connect a server in your docker network, you should change the host in the connection string that you are using to connect Mysql to the name of the container that you are willing to connect.
For your case, you have to change localhost with "customertransaction_db_host".

Unable to read mysql through Jyputer in docker containers (error: DatabaseError: 2005 (HY000): Unknown MySQL server host 'localhost:3306' (22))

My code is as follows:
import mysql.connector
mydb = mysql.connector.connect(host="localhost:3306",user="root",password="example")
print("Connected")
Docker compose for mysql and jyputer files:
# Use root/example as user/password credentials
version: '3.1'
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
AWS_ACCESS_KEY_ID: "A"
AWS_SECRET_ACCESS_KEY: "k"
adminer:
image: adminer
restart: always
ports:
- 8080:8080
jyputer:
version: "3"
services:
pyspark:
image: "jupyter/all-spark-notebook"
volumes:
- c:/code/pyspark-data:/home/jovyan
ports:
- 8888:8888
environment:
AWS_ACCESS_KEY_ID: "5H"
AWS_SECRET_ACCESS_KEY: "0oRBJk"
I have also created a network and kept all containers under one network, by using this command
docker network connect mynetwork 929cd60b08df
Error Received while execuitng in jyputer network:
DatabaseError: 2005 (HY000): Unknown MySQL server host 'localhost:3306' (22)
What have I tried:
mysql error 2005 - Unknown MySQL server host 'localhost'(11001)
127.0.0.1 localhost
this netry is already there in etc/hosts folder. Dont know what to do now
When you created a network you need to connect both containers
docker network create mynetwork
docker network connect mynetwork db_container_id
docker network connect mynetwork pyspark_container_id
Then get its config
docker network inspect mynetwork
It gives an IP addresses of this bridge network
[
{
"Name": "t11",
"Id": "bb203079ab3e48badacb3bb53181dd6871b2f60f22b4079729bc069e1739bbe0",
"Created": "2021-05-21T04:46:48.591105541Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.28.0.0/16",
"Gateway": "172.28.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"3ff678e8ddeb600b1af38a06dda053c8bf6544b136bfca91363379df1d40c69a": {
"Name": "t1_db_1",
"EndpointID": "deefd7c8a187b9513fd074f9632f961312a3bdaa8aa568be6223f3d301389808",
"MacAddress": "02:42:ac:1c:00:03",
"IPv4Address": "172.28.0.3/16",
"IPv6Address": ""
},
"9c95f68416586d3f1a87376a4a669df834d7b25eb22e3b3f33afb0ce1918d6cc": {
"Name": "t2_pyspark_1",
"EndpointID": "0fcbf15530f5b0a526c2036d26890e087f3becdd6eae1896e58a6a67efe2f676",
"MacAddress": "02:42:ac:1c:00:02",
"IPv4Address": "172.28.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
you need IP of db container, in this example it's 172.28.0.3
go with it
mydb = mysql.connector.connect(port="3306", host="172.28.0.3", user="root", password="example")
print("Connected")
cursor = mydb.cursor()
query = ("select 1;")
cursor.execute(query)
for r in cursor:
print(r)
cursor.close()

Travis is Failing without showing a reason

I am trying to build my project through travis-ci, but unknown error is happening when travis tries to test the project through mocha. i know the issue is not with mysql since the connection is there and scripts are working.
I am testing using
- ts-node/register
- Mocha
- Chai
- Chai-http
- mySQL (using pool)
The test is working fine locally, but on travis it is failing. i am thinking that it might be something with ts-node/register, in travis.
1 - i have tried remove the test completely and the build was fixed. but when i try to test it fails miserably.
package.json
{
"name": "xxxxxxxxx",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "ENV='PRODUCTION' node dist/app.js --verbose",
"debug": "node --inspect dist/app.js",
"dev": "ENV='DEVELOPMENT' nodemon src/app.ts --verbose",
"build": "tsc -p .",
"test": "ENV='TEST' mocha -r ts-node/register test/{,dbMappers}/**.test.ts --exit; ",
"test:awesome": "ENV='TEST' mocha -r ts-node/register test/{,dbMappers}/**.test.ts --reporter mochawesome --exit; "
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"app-root-path": "^2.2.1",
"bcrypt": "^3.0.6",
"body-parser": "^1.19.0",
"colors": "^1.3.3",
"cors": "^2.8.5",
"dotenv": "^8.0.0",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"mysql": "^2.17.1",
"uuid": "^3.3.2",
"winston": "^3.2.1"
},
"devDependencies": {
"#types/app-root-path": "^1.2.4",
"#types/bcrypt": "^3.0.0",
"#types/body-parser": "^1.17.0",
"#types/chai": "^4.2.0",
"#types/chai-http": "^4.2.0",
"#types/colors": "^1.2.1",
"#types/cors": "^2.8.5",
"#types/dotenv": "^6.1.1",
"#types/express": "^4.17.0",
"#types/jsonwebtoken": "^8.3.2",
"#types/mocha": "^5.2.7",
"#types/mysql": "^2.15.6",
"#types/node": "^12.6.8",
"#types/uuid": "^3.4.5",
"#types/winston": "^2.4.4",
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"mocha": "^6.2.0",
"mochawesome": "^4.1.0",
"nodemon": "^1.19.1",
"ts-node": "^8.3.0",
"typescript": "^3.5.3"
}
}
.travis.yml
language: node_js
node_js:
- "stable"
directories:
- "node_modules"
services:
- mysql
cache:
- "node_modules"
before_script:
- mysql -u root -e "CREATE USER 'test'#'localhost' IDENTIFIED BY 'xxxx'"
- mysql -u root -e 'CREATE DATABASE backend;'
- mysql -u root -e 'SHOW DATABASES'
- mysql -u root -e "GRANT ALL ON backend.* TO 'test'#'localhost';"
- npm install
env:
- ENV: 'TEST'
The Travis repo
https://travis-ci.com/moh682/hbas-system-api
The error that travis expose is only this.
yyy#1.0.0 test /home/travis/build/xxx/yyy
ENV='TEST' mocha -r ts-node/register test/{,dbMappers}/**.test.ts --exit;
xxx = username | yyy = repo name

exec: \"mysql\": executable file not found in $PATH": unknown

I've created a container based on the mysql:5.7 image. Then I set the password with this
docker run --name mysql -v $(pwd):/src -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7
Then I deployed my modules using docker-compose up -d on my docker-compose.yml file. Apparently, it raised an
exec: \"mysql\": executable file not found in $PATH": unknown
error and my 2 other modules also are having errors that keeps on restarting and point to mysql. I can import Python files in Django shell as well as mysql -u root -p but I cannot use the imports when it can't connect to the database.
Things I did based on my research:
I've set my Windows 10 environment variables to point at
C:\Program Files\MySQL\MySQL Server 8.0\bin where mysql.exe resides. It still didn't work.
mysql-init.txt (REF: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html): This runs the mysql prompt successfully.
grant all privileges on *.* to root#localhost;
ALTER USER 'root'#'localhost' IDENTIFIED BY 'password';
docker-compose.yml
version: '2'
services:
# Mysql
mysql:
image: mysql:5.7
restart: always
hostname: mysql
container_name: mysql
environment:
- MYSQL_USER=root
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DB=bitpal
ports:
- "3306:3306"
# Redis
redis:
image: redis:latest
restart: always
hostname: redis
container_name: redis
ports:
- "6379:6379"
# Django web server
bitpal:
image: python:3.5
restart: always
hostname: bitpal
container_name: bitpal
working_dir: /bitpal
command: ./bin/start_dev.sh
volumes:
- ./bitpal:/bitpal
- ./etc/config:/etc/config
- ./log:/log
ports:
- "80:80"
links:
- mysql
- redis
depends_on:
- mysql
environment:
# Database
- DB_NAME=bitpal
- DB_USER=root
- DB_PASSWORD=password
- DB_HOST=mysql
- DB_PORT=3306
# Celery worker
worker:
image: python:3.5
restart: always
container_name: worker
command: bash -c "./bin/install.sh && ./bin/celery_worker.sh"
working_dir: /bitpal
volumes:
- ./bitpal:/bitpal
- ./etc/config:/etc/config
- ./log:/log
links:
- mysql
- redis
depends_on:
- redis
# Bitshares websocket listener
websocket_listener:
image: python:3.5
restart: always
container_name: websocket_listener
command: bash -c "./bin/install.sh && ./bin/websocket_listener.sh"
working_dir: /bitpal
volumes:
- ./bitpal:/bitpal
- ./etc/config:/etc/config
- ./log:/log
links:
- mysql
- redis
depends_on:
- redis
# Nginx
nginx:
image: nginx:1.12.1
container_name: nginx
ports:
- "8000:80"
volumes:
- ./bitpal:/home/bitpal/bitpal/bitpal
- ./nginx:/etc/nginx/conf.d
depends_on:
- bitpal
Dockerfile
FROM python:3.5
RUN mkdir -p /bitpal
WORKDIR /bitpal
EXPOSE 80
ADD requirement.txt /bitpal/
RUN python3.5 -m pip install -r /bitpal/requirement.txt
settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'bitpal',
'USER': 'root',
'PASSWORD': 'password',
'HOST': SECRETS['db']['default']['hostname'],
'PORT': '3306',
'OPTIONS': {'autocommit': SECRETS['db']['default']['commit']}
}
}
docker version
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:06:28 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.04.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 3d479c0
Built: Tue Apr 10 18:23:35 2018
OS/Arch: linux/amd64
Experimental: false
docker info
Containers: 6
Running: 3
Paused: 0
Stopped: 3
Images: 6
Server Version: 18.04.0-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 46
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.93-boot2docker
Operating System: Boot2Docker 18.04.0-ce (TCL 8.2.1); HEAD : b8a34c0 - Wed Apr 11 17:00:55 UTC 2018
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.6MiB
Name: default
ID: I7DZ:5SQN:EOBV:PJOE:YHNK:RSXK:F6EH:4J7P:LSTI:CR2M:E2MV:VI27
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
docker inspect mysql:5.7
[
{
"Id": "sha256:0d16d0a97dd13a8ca0c0e205ce1f31f64d9d32048379eb322749442bff35f144",
"RepoTags": [
"mysql:5.7"
],
"RepoDigests": [
"mysql#sha256:f030e84582d939d313fe2ef469b5c65ffd0f7dff3b4b98e6ec9ae2dccd83dcdf"
],
"Parent": "",
"Comment": "",
"Created": "2018-05-04T23:41:21.907294662Z",
"Container": "7fed895363c6e67ba9d52eaea107a1267d63e2d5ad46c567926d6897c7175624",
"ContainerConfig": {
"Hostname": "7fed895363c6",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"MYSQL_MAJOR=5.7",
"MYSQL_VERSION=5.7.22-1debian9"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"CMD [\"mysqld\"]"
],
"ArgsEscaped": true,
"Image": "sha256:71f4997ae44aead33eefe93100990253bca456f7b63dc5aad5baa936e7c14c46",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": {}
},
"DockerVersion": "17.06.2-ce",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"3306/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.7",
"MYSQL_MAJOR=5.7",
"MYSQL_VERSION=5.7.22-1debian9"
],
"Cmd": [
"mysqld"
],
"ArgsEscaped": true,
"Image": "sha256:71f4997ae44aead33eefe93100990253bca456f7b63dc5aad5baa936e7c14c46",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": [],
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 371961246,
"VirtualSize": 371961246,
"GraphDriver": {
"Data": null,
"Name": "aufs"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:d626a8ad97a1f9c1f2c4db3814751ada64f60aed927764a3f994fcd88363b659",
"sha256:0fea3c8895d3871f5c577987f09735ae0889811efbad0dfde4d57851a4d40c00",
"sha256:ed9fd767a1ff316e1a5896e150cede3ba2bcfe406d2135a6bc6306295cc479af",
"sha256:f9dfc87a2e756c25245847a95ced53a6c065405b417d7635a28aa88235b30786",
"sha256:5081cf9eb26642b5373aaa6eea7e16b6caefc3a495cf8fa0f296df48d8651f2f",
"sha256:0404d129c384e4f45e5ae6a8d89c388a323bc0dda82ea45c6e4d0a442ea1e4b0",
"sha256:98bb41f25d3307bc5c124529cfde7c3c27a0d612d918e91a36fc1e852e2e629c",
"sha256:c11f67aad663de23cb77fbbbc6f7bee656e95e72cc820733aed6430a618738ab",
"sha256:d2f1dc45f8bf45758eee7bc59fe94e9f251c415ef8d08540529d1a004772ee9e",
"sha256:01df4e5c105921d20d800c1250c66009d472eb5628817bfa2c9523df5c53e03c",
"sha256:4f840ea0733fe23b9fda79ff521a2e6e8112a615df5db064570502af19c08511"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
Ok, I just got it resolved. Apparently, I forgot to create the DB and migrate the new changes. Here's how I did it.
Removed nginx module. My worker (celery) and websocket_listener modules are okay to keep on restarting. docker rm -f nginx
Ran in detached mode. docker-compose up -d mysql redis
Used bash under mysql container. docker exec -ti mysql bash
Entered credentials (I have initially set them in mysql-init.txt, REF: https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html) mysql -u root -p
Created DB. CREATE DATABASE bitpal;
Imported a certain .sql file that was missing in my modules.
Ran bitpal in detached mode. docker-compose up -d bitpal
Used bash under bitpal container. docker exec -ti bitpal bash
Migrations. python manage.py migrate
Used bash under mysql container. docker exec -ti mysql bash
Lastly, ran the sql under bitpal container. mysql -u root -p bitpal < <.sql file>
And it worked.
Here is the best option for the above issue. I did a lot of search for the same issue:
sudo apt-get install --reinstall mariadb-server
sudo apt-get install --reinstall php-mysql
service mysql status
service mysql start

How to npm install on Heroku

I would like to to deploy my app on Heroku through bitbucket-pipeline.
Flow is as follows.
composer install
npm install
Laravel-Mix(gulp task and brouserify and so on...)
These will be needed because "vendor" and "node_modules" are written in gitignore.
Now 2 and 3 are failed to build.
I guess it caused package.json or bitbucket-pipelines.yml, but I do not know how to code. Please give me solutions?
※nodejs buildpack is already installed
※I can npm install in Heroku app when I tried "heroku run bash", then "npm install"
Here is my "package.json" and "bitbucket-pipelines.yml" (Laravel5.4)
package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.15.3",
"bootstrap-sass": "^3.3.7",
"cross-env": "^3.2.3",
"jquery": "^3.1.1",
"laravel-mix": "0.*",
"lodash": "^4.17.4",
"vue": "^2.1.10"
}
}
bitbucket-pipelines.yml
// bitbucket-pipelines.yml
image: phpunit/phpunit:5.0.3
clone:
depth: full
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- composer install
- npm install
- npm run production
- git push https://heroku: test-stg.git HEAD