try building docker images in development first for linting
This commit is contained in:
parent
b86a4093c5
commit
217ae7011f
3 changed files with 8 additions and 11 deletions
11
.travis.yml
11
.travis.yml
|
@ -8,18 +8,15 @@ services:
|
|||
|
||||
before_install:
|
||||
# eventually set up AWS stuff here
|
||||
- docker-compose up -d
|
||||
- docker-compose -f docker-compose-development.yml up -d
|
||||
- docker ps -a
|
||||
|
||||
install: true
|
||||
|
||||
# before_script:
|
||||
# # Install dependencies in the app container
|
||||
# - docker-compose exec -T app composer self-update
|
||||
# - docker-compose exec -T app composer install --no-interaction
|
||||
# - docker-compose exec -T app composer dump-autoload -o
|
||||
|
||||
script:
|
||||
# Run unit tests in the app container
|
||||
- docker-compose exec -T app npm run test --verbose
|
||||
|
||||
after_success:
|
||||
- docker-compose stop
|
||||
- docker-compose build --no-cache
|
|
@ -34,7 +34,7 @@ Note that this takes up a significant amount of space on your machine. Make sure
|
|||
* Windows: https://www.docker.com/docker-windows
|
||||
2. Clone this repository and cd into it
|
||||
3. `$ docker-compose -f docker-compose-development.yml build`
|
||||
4. `$ docker-compose -f docker-compose-development.yml run --rm server npm run fetch-examples`
|
||||
4. `$ docker-compose -f docker-compose-development.yml run --rm app npm run fetch-examples`
|
||||
|
||||
Now, anytime you wish to start the server with its dependencies, you can run:
|
||||
|
||||
|
@ -43,11 +43,11 @@ Now, anytime you wish to start the server with its dependencies, you can run:
|
|||
|
||||
To open a terminal/shell in the running Docker server (i.e. after `docker-compose up` has been run):
|
||||
|
||||
7. `$ docker-compose -f docker-compose-development.yml exec server bash -l`
|
||||
7. `$ docker-compose -f docker-compose-development.yml exec app bash -l`
|
||||
|
||||
If you don't have the full server environment running, you can launch a one-off container instance (and have it automatically deleted after you're done using it):
|
||||
|
||||
8. `$ docker-compose -f docker-compose-development.yml run server --rm bash -l`
|
||||
8. `$ docker-compose -f docker-compose-development.yml run app --rm bash -l`
|
||||
|
||||
## Production Installation
|
||||
1. Clone this repository and `cd` into it
|
||||
|
|
|
@ -4,7 +4,7 @@ services:
|
|||
image: mongo:3.4.7
|
||||
volumes:
|
||||
- dbdata:/data/db
|
||||
server:
|
||||
app:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile
|
||||
|
|
Loading…
Reference in a new issue