Move init sql to data only container (#616)

Update travis config to build new setup
Add git sha-1 to ospos version string
This commit is contained in:
jekkos
2016-07-07 13:17:48 +02:00
parent be2bac84f1
commit f11c2d7a4d
8 changed files with 38 additions and 22 deletions

1
.gitattributes vendored
View File

@@ -1,3 +1,4 @@
dist/ merge=ours
application/language/**/*.php merge=ours
text=auto
application/config/config.php ident

View File

@@ -13,12 +13,15 @@ before_install:
- curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose -v
- docker -v
script:
- docker-compose build
- docker-compose up -d
after_success:
- '[ -n ${DOCKER_USERNAME} ] && docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag opensourcepos_php jekkos/opensourcepos:$TRAVIS_BRANCH && docker push jekkos/opensourcepos'
- >
'[ -n ${DOCKER_USERNAME} ] &&
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
docker tag opensourcepos_php jekkos/opensourcepos:$TRAVIS_BRANCH &&
docker tag opensourcepos_sqlscript jekkos/opensourcepos:sqlscript &&
docker push jekkos/opensourcepos'

View File

@@ -12,6 +12,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
$config['application_version'] = '3.0.0';
/*
|--------------------------------------------------------------------------
| Commit sha1
|--------------------------------------------------------------------------
|
| This is the commit hash for the version you are currently using
|
|
*/
$config['commit_sha1'] = '$Id$';
/*
|--------------------------------------------------------------------------
| Internal to OSPOS XSS Clean

View File

@@ -1,15 +0,0 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| theme name
|--------------------------------------------------------------------------
|
| the theme folder name. If the folder doesn't exist it will use default theme
|
| The default theme for OSPOS is flatly: http://bootswatch.com/flatly/
|
|
*/
//$config['theme_name'] = 'spacelab';

6
database/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM debian:jessie
MAINTAINER jekkos
ADD database.sql /docker-entrypoint-initdb.d/database.sql
VOLUME /docker-entrypoint-initdb.d

View File

@@ -1,3 +1,5 @@
sqlscript:
image: jekkos/opensourcepos:sqlscript
web:
image: jekkos/opensourcepos:master
links:
@@ -22,5 +24,5 @@ mysql:
- MYSQL_PASSWORD=pointofsale
ports:
- 3306:3306
volumes:
- /app/database/database.sql:/docker-entrypoint-initdb.d/database.sql
volumes_from:
- sqlscript

View File

@@ -5,6 +5,10 @@ services:
build:
context: .
dockerfile: Dockerfile.test
sqlscript:
build:
context: database/
dockerfile: Dockerfile
php:
build:
context: .

View File

@@ -5,6 +5,10 @@ volumes:
driver: local
services:
sqlscript:
build:
context: database/
dockerfile: Dockerfile
php:
build:
context: .
@@ -30,5 +34,5 @@ services:
- MYSQL_PASSWORD=pointofsale
ports:
- "3306:3306"
volumes:
- ./database/database.sql:/docker-entrypoint-initdb.d/database.sql
volumes_from:
- sqlscript