Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Attempt to fix docker image test in github action

Cyril Rohre095c94eecf9
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 425f4e05e8d..39edc64fc0b 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -23,11 +23,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
tag_semver: true
cache: ${{ github.event_name != 'schedule' }}
- - name: Test1
- run: which docker || true
- - name: Test2
+ - name: Test
run: |
- ls -lrt .
- which docker || true
docker run -d -p 8080:80 -e SUPERVISORD_LOG_LEVEL=debug -e SECRET_KEY_BASE=secret ${{ steps.build_and_push.outputs.digest }}
- curl --fail -k --retry 10 http://localhost:8080/api/v3
+ curl --fail -k --retry 10 --retry-connrefused -vvv http://localhost:8080/api/v3
diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.yml
index d1243b24e20..2a8c0bded4f 100644
--- a/.github/workflows/pullpreview.yml
+++ b/.github/workflows/pullpreview.yml
@@ -1,8 +1,10 @@
name: PullPreview
on:
push:
+ branches:
+ - dev
pull_request:
- types: [labeled, unlabeled, closed]
+ types: [labeled, unlabeled, closed, reopened, synchronized]
jobs:
deploy:
diff --git a/Dockerfile b/Dockerfile
index 938f94003b4..8bd0a7f15e5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,72 +1 @@
-FROM ruby:2.6-stretch AS pgloader
-RUN apt-get update -qq && apt-get install -y libsqlite3-dev make curl gawk freetds-dev libzip-dev
-COPY docker/mysql-to-postgres/bin/build /tmp/build-pgloader
-RUN /tmp/build-pgloader && rm /tmp/build-pgloader
-
-FROM ruby:2.6-stretch
-MAINTAINER [email protected]
-
-# Allow platform-specific additions. Valid values are: on-prem,saas,bahn
-ARG PLATFORM=on-prem
-# Use OAuth token in case private gems need to be fetched
-ARG GITHUB_OAUTH_TOKEN
-ARG DEBIAN_FRONTEND=noninteractive
-
-ENV NODE_VERSION="12.18.3"
-ENV BUNDLER_VERSION="2.0.2"
-ENV BUNDLE_PATH__SYSTEM=false
-ENV APP_USER=app
-ENV APP_PATH=/app
-ENV APP_DATA_PATH=/var/openproject/assets
-ENV APP_DATA_PATH_LEGACY=/var/db/openproject
-ENV PGBIN="/usr/lib/postgresql/9.6/bin"
-ENV PGDATA=/var/openproject/pgdata
-ENV PGDATA_LEGACY=/var/lib/postgresql/9.6/main
-
-ENV DATABASE_URL=postgres://openproject:[email protected]/openproject
-ENV HEROKU=true
-ENV RAILS_ENV=production
-ENV RAILS_CACHE_STORE=memcache
-ENV RAILS_GROUPS="production docker opf_plugins"
-ENV OPENPROJECT_INSTALLATION__TYPE=docker
-# Valid values are: standard,bim
-ENV OPENPROJECT_EDITION=standard
-ENV NEW_RELIC_AGENT_ENABLED=false
-ENV ATTACHMENTS_STORAGE_PATH=$APP_DATA_PATH/files
-# Set a default key base, ensure to provide a secure value in production environments!
-ENV SECRET_KEY_BASE=OVERWRITE_ME
-
-COPY --from=pgloader /usr/local/bin/pgloader-ccl /usr/local/bin/
-
-WORKDIR $APP_PATH
-
-COPY docker/setup ./docker/setup
-RUN ./docker/setup/preinstall.sh
-
-COPY Gemfile ./Gemfile
-COPY Gemfile.* ./
-COPY modules ./modules
-COPY vendor ./vendor
-# some gemspec files of plugins require files in there, notably OpenProject::Version
-COPY lib ./lib
-
-RUN bundle install --quiet --deployment --path vendor/bundle --no-cache \
- --with="$RAILS_GROUPS" --without="test development" --jobs=8 --retry=3 && \
- rm -rf vendor/bundle/ruby/*/cache && rm -rf vendor/bundle/ruby/*/gems/*/spec && rm -rf vendor/bundle/ruby/*/gems/*/test
-
-# Finally, copy over the whole thing
-COPY . .
-
-RUN ./docker/setup/postinstall.sh
-
-# Expose ports for apache and postgres
-EXPOSE 80 5432
-
-# Expose the postgres data directory and OpenProject data directory as volumes
-VOLUME ["$PGDATA", "$APP_DATA_PATH"]
-
-# Set a custom entrypoint to allow for privilege dropping and one-off commands
-ENTRYPOINT ["./docker/entrypoint.sh"]
-
-# Set default command to launch the all-in-one configuration supervised by supervisord
-CMD ["./docker/supervisord"]
+FROM nginx