Skip to content

Commit

Permalink
Merge pull request #360 from spira/feature/docker-structure-update
Browse files Browse the repository at this point in the history
Feature/docker structure update
  • Loading branch information
zakhenry committed Jan 19, 2016
2 parents f5f891f + f3bb3ad commit 8144516
Show file tree
Hide file tree
Showing 16 changed files with 172 additions and 224 deletions.
15 changes: 0 additions & 15 deletions .dockerignore

This file was deleted.

19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# run `docker build -t spira/spira:latest .` to build this container
# run docker build -t spira/spira:latest -f ./docker/Dockerfile .

FROM spira/docker-base
FROM busybox:1.24.1

MAINTAINER "Zak Henry" <zak.henry@gmail.com>

# create data dir
RUN mkdir -p /data

# only add the required data code
COPY api /data/api/
COPY app/build /data/app/build
COPY forum /data/forum

# add vhosts for the nginx container
COPY vhosts /data/vhosts/

# make sure the logs directory exists
RUN mkdir -p /data/logs
# copy all files to data dir
COPY . /data

# allow data dir to be mounted as volue
VOLUME /data

# set the cwd
WORKDIR /data
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Lumen + AngularJS project seed with Docker
* [Typescript](http://www.typescriptlang.org/)
* [API Blueprint](https://apiblueprint.org/)
* [Apiary](https://apiary.io/)
* [Drakov](https://github.com/Aconex/drakov)
* [Snowcrash](https://github.com/apiaryio/snowcrash)
* [Clarity](https://github.com/tobi/clarity)
* [Mailcatcher](http://mailcatcher.me/)
Expand Down
1 change: 0 additions & 1 deletion app/src/app/guest/sandbox/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ namespace app.guest.sandbox {
public callApi(apiEndpoint):void {

this.ngRestAdapter
//.api('/api-mock')
.get(apiEndpoint)
.then((result) => {
this.$scope.apiResult = result;
Expand Down
3 changes: 1 addition & 2 deletions app/src/common/services/user/userService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ namespace common.services.user {
$httpBackend.expectPATCH('/api/users/' + user.userId,
(jsonData:string) => {
let data:{emailConfirmed:string} = JSON.parse(jsonData);
// TSD only has definitions for moment 2.8.0 which does not contain function isBetween
return data.emailConfirmed && (<any>moment)(data.emailConfirmed).isBetween(moment().subtract(1, 'second'), moment());
return data.emailConfirmed && moment(data.emailConfirmed).isValid();
},
(headers) => {
return headers['email-confirm-token'] == emailToken;
Expand Down
132 changes: 0 additions & 132 deletions docker-compose.build.yml

This file was deleted.

11 changes: 2 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ web:
- php:php
- logviewer:logviewer
- mailcatcher:mailcatcher
- apimock:apimock
volumes_from:
- data
env_file: ./docker/.local.env
Expand All @@ -127,14 +126,8 @@ devtools:
- elasticsearch:elasticsearch
volumes_from:
- data
volumes:
- /cache:/cache
env_file:
- ./docker/.local.env

apimock:
extends:
file: ./docker/common-services.yml
service: apimock
volumes_from:
- data
env_file:
- ./docker/.local.env
7 changes: 6 additions & 1 deletion docker/.common.env
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ BEANSTALKD_HOST=queue
# S3_KEY=null
# S3_SECRET=null
# S3_REGION=null
# S3_BUCKET=null
# S3_BUCKET=null

#caching for build
COMPOSER_HOME=/cache/composer
bower_storage__packages=/cache/bower
npm_config_cache=/cache/npm
6 changes: 0 additions & 6 deletions docker/common-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ devtools:
- .common.env
- .secret.env

apimock:
image: spira/docker-drakov
env_file:
- .common.env


elasticsearch:
image: elasticsearch:1.7.1
env_file:
Expand Down
14 changes: 14 additions & 0 deletions docker/docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Build configuration. This file is identical to the dev `docker-compose.yml` definition, except it exposes no ports to
# allow multiple concurrent builds without concern of port collision
devtools:
image: spira/docker-dev-tools
working_dir: /data
privileged: true
volumes:
# - /data:/data
- %build_directory%:/data
- %cache_directory%:/cache
env_file:
- .common.env
- .secret.env
- .qa.env
Loading

0 comments on commit 8144516

Please sign in to comment.