mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
- ci fixes
- docker-compose.test.yml - fixed nuxt permissions in dev environment(docker)
This commit is contained in:
parent
a530e5151a
commit
dec17d0e8d
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@ -43,8 +43,8 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
- name: Neo4J | Build `community` image
|
- name: Neo4J | Build `community` image
|
||||||
run: |
|
run: |
|
||||||
docker build --target community -t "ocelotsocialnetwork/neo4j:latest" neo4j/
|
docker build --target community -t "ocelotsocialnetwork/neo4j:community" neo4j/
|
||||||
docker save "ocelotsocialnetwork/neo4j:latest" > /tmp/neo4j.tar
|
docker save "ocelotsocialnetwork/neo4j:community" > /tmp/neo4j.tar
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
@ -194,15 +194,14 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
# UNIT TESTS BACKEND #####################################################
|
# UNIT TESTS BACKEND #####################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
- name: backend | copy env files webapp
|
#- name: backend | copy env files webapp
|
||||||
run: cp webapp/.env.template webapp/.env
|
# run: cp webapp/.env.template webapp/.env
|
||||||
- name: backend | copy env files backend
|
#- name: backend | copy env files backend
|
||||||
run: cp backend/.env.template backend/.env
|
# run: cp backend/.env.template backend/.env
|
||||||
- name: backend | docker-compose
|
- name: backend | docker-compose
|
||||||
run: docker-compose up
|
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up neo4j backend
|
||||||
- name: backend | Unit tests
|
- name: backend | Unit tests
|
||||||
run: docker-compose exec backend yarn test
|
run: docker-compose exec backend yarn test
|
||||||
#run: docker run --network container:webapp-frontend appropriate/curl -s --retry 10 --retry-connrefused http://localhost:5000/
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# JOB: UNIT TEST WEBAPP ######################################################
|
# JOB: UNIT TEST WEBAPP ######################################################
|
||||||
@ -230,8 +229,11 @@ jobs:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
# UNIT TESTS WEBAPP #####################################################
|
# UNIT TESTS WEBAPP #####################################################
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
- name: backend | docker-compose
|
||||||
|
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up webapp
|
||||||
- name: webapp | Unit tests
|
- name: webapp | Unit tests
|
||||||
run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
|
#run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
|
||||||
|
run: docker-compose exec webapp yarn test
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# JOB: DOCKER BUILD PRODUCTION & PUSH ########################################
|
# JOB: DOCKER BUILD PRODUCTION & PUSH ########################################
|
||||||
|
|||||||
@ -11,7 +11,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- NODE_ENV="development"
|
- NODE_ENV="development"
|
||||||
# - DEBUG=true
|
# - DEBUG=true
|
||||||
# - NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/`
|
- NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/`
|
||||||
volumes:
|
volumes:
|
||||||
# This makes sure the docker container has its own node modules.
|
# This makes sure the docker container has its own node modules.
|
||||||
# Therefore it is possible to have a different node version on the host machine
|
# Therefore it is possible to have a different node version on the host machine
|
||||||
|
|||||||
47
docker-compose.test.yml
Normal file
47
docker-compose.test.yml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
version: "3.4"
|
||||||
|
|
||||||
|
services:
|
||||||
|
########################################################
|
||||||
|
# WEBAPP ###############################################
|
||||||
|
########################################################
|
||||||
|
webapp:
|
||||||
|
image: ocelotsocialnetwork/webapp:build
|
||||||
|
build:
|
||||||
|
target: build
|
||||||
|
environment:
|
||||||
|
- NODE_ENV="test"
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# BACKEND ##############################################
|
||||||
|
########################################################
|
||||||
|
backend:
|
||||||
|
image: ocelotsocialnetwork/backend:build
|
||||||
|
build:
|
||||||
|
target: build
|
||||||
|
environment:
|
||||||
|
- NODE_ENV="test"
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# NEO4J ################################################
|
||||||
|
########################################################
|
||||||
|
neo4j:
|
||||||
|
image: ocelotsocialnetwork/neo4j:community
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# MAINTENANCE ##########################################
|
||||||
|
########################################################
|
||||||
|
maintenance:
|
||||||
|
image: ocelotsocialnetwork/maintenance:build
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# MAILSERVER TO FAKE SMTP ##############################
|
||||||
|
########################################################
|
||||||
|
mailserver:
|
||||||
|
image: djfarrelly/maildev
|
||||||
|
ports:
|
||||||
|
- 1080:80
|
||||||
|
networks:
|
||||||
|
- external-net
|
||||||
|
volumes:
|
||||||
|
webapp_node_modules:
|
||||||
|
backend_node_modules:
|
||||||
Loading…
x
Reference in New Issue
Block a user