Skip to content

Commit

Permalink
Run from docker image, not source
Browse files Browse the repository at this point in the history
  • Loading branch information
iainsproat committed Dec 31, 2024
1 parent d0c8287 commit beb60ef
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 228 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/rest-api-fuzzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,34 +160,15 @@ jobs:
sudo apt-get install --yes --no-install-recommends postgresql-client
PGPASSWORD=speckle psql -h 127.0.0.1 -U speckle -d speckle -p 5432 -w < ${{ github.workspace }}/speckle-server/setup/fuzzer/speckle.backup.sql
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
cache-dependency-path: ${{ github.workspace }}/speckle-server/yarn.lock
- name: Install dependencies
working-directory: ${{ github.workspace }}/speckle-server/packages/server
run: yarn install
- name: Build public packages
working-directory: ${{ github.workspace }}/speckle-server/packages/server
run: yarn build:public
- name: Build speckle-server
working-directory: ${{ github.workspace }}/speckle-server/packages/server
run: yarn build
- name: Configure speckle-server
working-directory: ${{ github.workspace }}/speckle-server/packages/server
working-directory: ${{ github.workspace }}
run: |
cp ${{ github.workspace }}/speckle-server/setup/fuzzer/.env.fuzz-test-example .env
- name: Run speckle-server
working-directory: ${{ github.workspace }}/speckle-server/packages/server
working-directory: ${{ github.workspace }}
timeout-minutes: 1
run: |
yarn start &
until curl --output /dev/null --silent --head --fail http://127.0.0.1:3000/readiness; do
echo "Waiting a further 3 seconds for speckle-server to start..."
sleep 3
done
docker compose --file ${{ github.workspace }}/speckle-server/setup/fuzzer/docker-compose-speckle.yml up --detach
- name: Run RESTler coverage test
run: |
Expand Down Expand Up @@ -259,3 +240,4 @@ jobs:
if: always()
run: |
docker compose --file ${{ github.workspace }}/speckle-server/docker-compose-deps.yml logs
docker compose --file ${{ github.workspace }}/speckle-server/setup/fuzzer/docker-compose-speckle.yml logs
35 changes: 0 additions & 35 deletions setup/fuzzer/.env.fuzz-test-example

This file was deleted.

52 changes: 52 additions & 0 deletions setup/fuzzer/docker-compose-speckle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: '2.4'
services:
speckle-server:
platform: linux/amd64
image: speckle/speckle-server:latest
restart: always
ports:
- '0.0.0.0:3000:3000'
healthcheck:
test:
- CMD
- /nodejs/bin/node
- -e
- "try { require('node:http').request({headers: {'Content-Type': 'application/json'}, port:3000, hostname:'127.0.0.1', path:'/readiness', method: 'GET', timeout: 2000 }, (res) => { body = ''; res.on('data', (chunk) => {body += chunk;}); res.on('end', () => {process.exit(res.statusCode != 200 || body.toLowerCase().includes('error'));}); }).end(); } catch { process.exit(1); }"
interval: 10s
timeout: 10s
retries: 3
start_period: 90s
environment:
PORT: 3000

CANONICAL_URL: 'http://127.0.0.1:3000'
SESSION_SECRET: '-> FILL IN <-'

REDIS_URL: 'redis://redis:6379'

USE_FRONTEND_2: true
FRONTEND_ORIGIN: 'http://127.0.0.1:8081'

ENABLE_FE2_MESSAGING: false

POSTGRES_URL: 'postgres'
POSTGRES_USER: 'speckle'
POSTGRES_PASSWORD: 'speckle'
POSTGRES_DB: 'speckle'

S3_ENDPOINT: 'http://minio:9000'
S3_ACCESS_KEY: 'minioadmin'
S3_SECRET_KEY: 'minioadmin'
S3_BUCKET: 'speckle-server'
S3_CREATE_BUCKET: 'true'

EMAIL: false

DISABLE_NOTIFICATIONS_CONSUMPTION: true
STRATEGY_LOCAL: true
networks:
- speckle-server_default

networks:
speckle-server_default:
external: true
Loading

0 comments on commit beb60ef

Please sign in to comment.