mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 15:25:57 +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
|
||||
run: |
|
||||
docker build --target community -t "ocelotsocialnetwork/neo4j:latest" neo4j/
|
||||
docker save "ocelotsocialnetwork/neo4j:latest" > /tmp/neo4j.tar
|
||||
docker build --target community -t "ocelotsocialnetwork/neo4j:community" neo4j/
|
||||
docker save "ocelotsocialnetwork/neo4j:community" > /tmp/neo4j.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@ -194,15 +194,14 @@ jobs:
|
||||
##########################################################################
|
||||
# UNIT TESTS BACKEND #####################################################
|
||||
##########################################################################
|
||||
- name: backend | copy env files webapp
|
||||
run: cp webapp/.env.template webapp/.env
|
||||
- name: backend | copy env files backend
|
||||
run: cp backend/.env.template backend/.env
|
||||
#- name: backend | copy env files webapp
|
||||
# run: cp webapp/.env.template webapp/.env
|
||||
#- name: backend | copy env files backend
|
||||
# run: cp backend/.env.template backend/.env
|
||||
- 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
|
||||
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 ######################################################
|
||||
@ -230,8 +229,11 @@ jobs:
|
||||
##########################################################################
|
||||
# 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
|
||||
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 ########################################
|
||||
|
||||
@ -11,7 +11,7 @@ services:
|
||||
environment:
|
||||
- NODE_ENV="development"
|
||||
# - 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:
|
||||
# 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
|
||||
|
||||
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