Merge branch 'master' into 5982-fix-donation-bar-blink

This commit is contained in:
Markus 2023-03-14 11:52:55 +01:00 committed by GitHub
commit 36c05edf5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 65 additions and 21 deletions

View File

@ -329,19 +329,16 @@ jobs:
- name: backend | docker-compose - name: backend | docker-compose
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp neo4j backend
- name: cypress | Fullstack tests - name: cypress | Fullstack tests
id: e2e-tests
run: | run: |
yarn install yarn install
yarn run cypress:run --spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }} ) yarn run cypress:run --spec $(cypress/parallel-features.sh ${{ matrix.job }} ${{ env.jobs }} )
########################################################################## ##########################################################################
# UPLOAD SCREENSHOTS & VIDEO ############################################# # UPLOAD SCREENSHOTS - IF TESTS FAIL #####################################
########################################################################## ##########################################################################
- name: Upload Artifact - name: Full stack tests | if any test failed, upload screenshots
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: cypress-screenshots name: cypress-screenshots
path: cypress/screenshots/ path: cypress/screenshots/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: cypress-videos
path: cypress/videos/

View File

@ -197,7 +197,8 @@ Prepare database once before you start by running the following command in a sec
```bash ```bash
# in main folder while docker-compose is up # in main folder while docker-compose is up
$ docker-compose exec backend yarn run db:migrate init $ docker compose exec backend yarn run db:migrate init
$ docker compose exec backend yarn run db:migrate up
``` ```
Then clear and seed database by running the following command as well in the second terminal: Then clear and seed database by running the following command as well in the second terminal:

View File

@ -81,8 +81,7 @@ More details about our GraphQL playground and how to use it with ocelot.social c
### Database Indexes and Constraints ### Database Indexes and Constraints
Database indexes and constraints need to be created when the database and the Database indexes and constraints need to be created and upgraded when the database and the backend are running:
backend is running:
{% tabs %} {% tabs %}
{% tab title="Docker" %} {% tab title="Docker" %}
@ -98,6 +97,11 @@ $ docker compose exec backend yarn prod:migrate init
$ docker compose exec backend /bin/sh -c "yarn prod:migrate init" $ docker compose exec backend /bin/sh -c "yarn prod:migrate init"
``` ```
```bash
# in main folder with docker compose running
$ docker exec backend yarn run db:migrate up
```
{% endtab %} {% endtab %}
{% tab title="Without Docker" %} {% tab title="Without Docker" %}
@ -107,6 +111,11 @@ $ docker compose exec backend /bin/sh -c "yarn prod:migrate init"
yarn run db:migrate init yarn run db:migrate init
``` ```
```bash
# in backend/ with database running (In docker or local)
yarn run db:migrate up
```
{% endtab %} {% endtab %}
{% endtabs %} {% endtabs %}
@ -134,6 +143,8 @@ $ docker exec backend yarn run db:reset
$ docker-compose down -v $ docker-compose down -v
# if container is not running, run this command to set up your database indexes and constraints # if container is not running, run this command to set up your database indexes and constraints
$ docker exec backend yarn run db:migrate init $ docker exec backend yarn run db:migrate init
# And then upgrade the indexes and const
$ docker exec backend yarn run db:migrate up
``` ```
{% endtab %} {% endtab %}

View File

@ -4,6 +4,7 @@
"ignoreTestFiles": "*.js", "ignoreTestFiles": "*.js",
"chromeWebSecurity": false, "chromeWebSecurity": false,
"baseUrl": "http://localhost:3000", "baseUrl": "http://localhost:3000",
"video":false,
"retries": { "retries": {
"runMode": 2, "runMode": 2,
"openMode": 0 "openMode": 0

View File

@ -0,0 +1,33 @@
# Docker
## Apple M1 Platform
***Attention:** For using Docker commands in Apple M1 environments!*
```bash
# set env variable for your shell
$ export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
For even more informations, see [Docker More Closely](#docker-more-closely)
### Docker Compose Override File For Apple M1 Platform
For Docker compose `up` or `build` commands, you can use our Apple M1 override file that specifies the M1 platform:
```bash
# in main folder
# for production
$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up
# for production testing Docker images from DockerHub
$ docker compose -f docker-compose.ocelotsocial-branded.yml -f docker-compose.apple-m1.override.yml up
# only once: init admin user and create indexes and constraints in Neo4j database
$ docker compose exec backend /bin/sh -c "yarn prod:migrate init"
```
## Docker More Closely In Main Code
To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md).

View File

@ -30,6 +30,7 @@ export default {
} }
} }
.filterActive { .filterActive {
background-color: $color-success-active; color: $color-primary-inverse;
background-color: $color-primary-active;
} }
</style> </style>

View File

@ -26,7 +26,7 @@
v-observe-visibility="(isVisible, entry) => visibilityChanged(isVisible, entry, post.id)" v-observe-visibility="(isVisible, entry) => visibilityChanged(isVisible, entry, post.id)"
> >
<div class="categories" v-if="categoriesActive"> <div class="categories" v-if="categoriesActive">
<hc-category <category
v-for="category in post.categories" v-for="category in post.categories"
:key="category.id" :key="category.id"
v-tooltip="{ v-tooltip="{
@ -81,11 +81,11 @@
</template> </template>
<script> <script>
import UserTeaser from '~/components/UserTeaser/UserTeaser' import Category from '~/components/Category'
import ContentMenu from '~/components/ContentMenu/ContentMenu' import ContentMenu from '~/components/ContentMenu/ContentMenu'
import HcRibbon from '~/components/Ribbon'
import HcCategory from '~/components/Category'
import CounterIcon from '~/components/_new/generic/CounterIcon/CounterIcon' import CounterIcon from '~/components/_new/generic/CounterIcon/CounterIcon'
import HcRibbon from '~/components/Ribbon'
import UserTeaser from '~/components/UserTeaser/UserTeaser'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import PostMutations from '~/graphql/PostMutations' import PostMutations from '~/graphql/PostMutations'
import { postMenuModalsData, deletePostMutation } from '~/components/utils/PostHelpers' import { postMenuModalsData, deletePostMutation } from '~/components/utils/PostHelpers'
@ -93,11 +93,11 @@ import { postMenuModalsData, deletePostMutation } from '~/components/utils/PostH
export default { export default {
name: 'PostTeaser', name: 'PostTeaser',
components: { components: {
UserTeaser, Category,
HcCategory,
HcRibbon,
ContentMenu, ContentMenu,
CounterIcon, CounterIcon,
HcRibbon,
UserTeaser,
}, },
props: { props: {
post: { post: {

View File

@ -15,7 +15,7 @@ export default {
}, },
{ {
name: 'viewport', name: 'viewport',
content: 'width=device-width, initial-scale=1', content: 'initial-scale=1',
}, },
{ {
hid: 'description', hid: 'description',

View File

@ -62,7 +62,7 @@ export default {
}, },
{ {
name: 'viewport', name: 'viewport',
content: 'width=device-width, initial-scale=1', content: 'initial-scale=1',
}, },
{ {
hid: 'description', hid: 'description',