try building docker images in development first for linting

This commit is contained in:
Cassie Tarakajian 2018-06-20 10:01:11 -07:00
parent b86a4093c5
commit 217ae7011f
3 changed files with 8 additions and 11 deletions

View file

@ -8,18 +8,15 @@ services:
before_install: before_install:
# eventually set up AWS stuff here # eventually set up AWS stuff here
- docker-compose up -d - docker-compose -f docker-compose-development.yml up -d
- docker ps -a - docker ps -a
install: true 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: script:
# Run unit tests in the app container # Run unit tests in the app container
- docker-compose exec -T app npm run test --verbose - docker-compose exec -T app npm run test --verbose
after_success:
- docker-compose stop
- docker-compose build --no-cache

View file

@ -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 * Windows: https://www.docker.com/docker-windows
2. Clone this repository and cd into it 2. Clone this repository and cd into it
3. `$ docker-compose -f docker-compose-development.yml build` 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: 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): 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): 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 ## Production Installation
1. Clone this repository and `cd` into it 1. Clone this repository and `cd` into it

View file

@ -4,7 +4,7 @@ services:
image: mongo:3.4.7 image: mongo:3.4.7
volumes: volumes:
- dbdata:/data/db - dbdata:/data/db
server: app:
build: build:
context: ./ context: ./
dockerfile: Dockerfile dockerfile: Dockerfile