mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Configure docker-compose, travis multistage build
This commit is contained in:
parent
5778ef3bc0
commit
e88b674a29
@ -18,8 +18,8 @@ before_install:
|
||||
- sudo mv docker-compose /usr/local/bin
|
||||
|
||||
install:
|
||||
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-web .
|
||||
- docker-compose -f docker-compose.yml up -d
|
||||
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT --target production -t humanconnection/nitro-web .
|
||||
- docker-compose -f docker-compose.travis.yml up -d
|
||||
- git clone https://github.com/Human-Connection/Nitro-Backend.git ../Nitro-Backend
|
||||
- git -C "../Nitro-Backend" checkout $TRAVIS_BRANCH || echo "Branch \`$TRAVIS_BRANCH\` does not exist, falling back to \`master\`"
|
||||
- docker-compose -f ../Nitro-Backend/docker-compose.yml -f ../Nitro-Backend/docker-compose.travis.yml up -d
|
||||
|
||||
@ -2,6 +2,9 @@ version: '3.7'
|
||||
|
||||
services:
|
||||
webapp:
|
||||
build:
|
||||
context: .
|
||||
target: builder
|
||||
volumes:
|
||||
- .:/nitro-web
|
||||
- node_modules:/nitro-web/node_modules
|
||||
|
||||
8
docker-compose.travis.yml
Normal file
8
docker-compose.travis.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
backend:
|
||||
image: humanconnection/nitro-web:builder
|
||||
build:
|
||||
context: .
|
||||
target: builder
|
||||
@ -3,7 +3,9 @@ version: '3.7'
|
||||
services:
|
||||
webapp:
|
||||
image: humanconnection/nitro-web:latest
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
target: production
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 8080:8080
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user