Skip to content

Commit 7f888b6

Browse files
committed
add docker compose file for ci
Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
1 parent e97ebd2 commit 7f888b6

File tree

3 files changed

+119
-12
lines changed

3 files changed

+119
-12
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
run: |
6969
composer install --no-progress --prefer-dist --optimize-autoloader
7070
git clone --depth 1 https://github.com/nextcloud/server.git -b ${{ matrix.nextcloudVersion }}
71-
ls -al
7271
# cd server && git submodule update --init
7372
# ./occ maintenance:install --admin-pass=admin
7473

@@ -98,14 +97,14 @@ jobs:
9897
mkdir -p server/apps/integration_openproject
9998
cp -r `ls -A | grep -v 'server'` server/apps/integration_openproject/
10099
cd server
101-
pwd
102-
# apt update -y
103-
# apt install openssl -y
104-
# apt install curl -y
105-
# openssl version
106-
# openssl req -subj '/CN=nextcloud.local/C=NP/L=Pokhara' -x509 -sha256 -nodes -days 3650 -newkey rsa:2048 -keyout ./data/ssl/nextcloud.local.key -out ./data/ssl/nextcloud.local.crt
107-
# ls ./data/ssl
108-
#
100+
apt update -y
101+
apt install openssl -y
102+
apt install curl -y
103+
openssl version
104+
openssl req -subj '/CN=nextcloud.local/C=NP/L=Pokhara' -x509 -sha256 -nodes -days 3650 -newkey rsa:2048 -keyout ./apps/integration_openproject/ci/data/ssl/nextcloud.local.key -out ./apps/integration_openproject/ci/data/ssl/nextcloud.local.crt
105+
update-ca-certificates
106+
ls ./apps/integration_openproject/ci/data/ssl
107+
docker compose version
109108
# - name: JS Code Coverage Summary Report
110109
# if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '8.1' }}
111110
# uses: romeovs/lcov-reporter-action@v0.3.1

ci/data/ssl/.gitkeep

Whitespace-only changes.

ci/docker-compose.yml

Lines changed: 111 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,112 @@
1-
FROM ubuntu:latest
2-
LABEL authors="swikriti"
1+
version: '3'
32

4-
ENTRYPOINT ["top", "-b"]
3+
services:
4+
5+
# Proxy for ssl termination and easier hostname access
6+
# SSL certificates with the virtual host name need to be added to ./data/ssl
7+
proxy:
8+
image: ghcr.io/juliushaertl/nextcloud-dev-nginx:latest
9+
ports:
10+
- "${PROXY_PORT_HTTP:-80}:80"
11+
- "${PROXY_PORT_HTTPS:-443}:443"
12+
volumes:
13+
- /var/run/docker.sock:/tmp/docker.sock:ro
14+
- ./data/ssl/:/etc/nginx/certs
15+
environment:
16+
DHPARAM_BITS: 2048
17+
DHPARAM_GENERATION: "false"
18+
HTTPS_METHOD: "noredirect"
19+
HSTS: "off"
20+
cap_add:
21+
- SYS_ADMIN
22+
networks:
23+
default:
24+
aliases:
25+
- nextcloud${DOMAIN_SUFFIX}
26+
27+
nextcloud:
28+
image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-81}:latest
29+
environment:
30+
SQL: ${SQL:-mysql}
31+
NEXTCLOUD_AUTOINSTALL: "YES"
32+
NEXTCLOUD_AUTOINSTALL_APPS:
33+
WITH_REDIS: "YES"
34+
VIRTUAL_HOST: "nextcloud${DOMAIN_SUFFIX}"
35+
ADDITIONAL_APPS_PATH:
36+
NEXTCLOUD_TRUSTED_DOMAINS:
37+
PRIMARY: ${PRIMARY}
38+
PHP_XDEBUG_MODE: ${PHP_XDEBUG_MODE:-develop}
39+
volumes:
40+
- '${STABLE_ROOT_PATH}:/var/www/html'
41+
- '${STABLE_ROOT_PATH}/apps-extra:/var/www/html/apps-extra'
42+
- /var/www/html/data
43+
- /var/www/html/config
44+
- /var/www/html/apps-writable
45+
depends_on:
46+
- ${DB_SERVICE:-database-mysql}
47+
- redis
48+
- proxy
49+
extra_hosts:
50+
- host.docker.internal:host-gateway
51+
52+
database-mysql:
53+
image: mariadb:10.6
54+
environment:
55+
MYSQL_ROOT_PASSWORD: 'nextcloud'
56+
MYSQL_PASSWORD: 'nextcloud'
57+
MYSQL_USER: 'nextcloud'
58+
MYSQL_DATABASE: 'nextcloud'
59+
ports:
60+
- "${PORTBASE:-800}2:3306"
61+
volumes:
62+
- mysql:/var/lib/mysql
63+
64+
database-postgres:
65+
image: postgres:latest
66+
environment:
67+
POSTGRES_DB: nextcloud
68+
POSTGRES_PASSWORD: postgres
69+
ports:
70+
- 5432:5432
71+
expose:
72+
- 5432
73+
volumes:
74+
- postgres:/var/lib/postgresql
75+
76+
redis:
77+
image: redis:7
78+
79+
openproject:
80+
image: openproject/community:13
81+
environment:
82+
OPENPROJECT_SECRET_KEY_BASE: "secret"
83+
OPENPROJECT_HOST__NAME: "host.docker.internal:3000"
84+
OPENPROJECT_DEV_EXTRA_HOSTS: "host.docker.internal"
85+
OPENPROJECT_HTTPS: false
86+
HOST: 0.0.0.0
87+
OPENPROJECT_PASSWORD__MIN__LENGTH: 0
88+
OPENPROJECT_ONBOARDING__ENABLED: false
89+
OPENPROJECT_AUTHENTICATION_GLOBAL__BASIC__AUTH_USER: "apiadmin"
90+
OPENPROJECT_AUTHENTICATION_GLOBAL__BASIC__AUTH_PASSWORD: "apiadmin"
91+
CI: true
92+
ports:
93+
- "3000:80"
94+
extra_hosts:
95+
- host.docker.internal:host-gateway
96+
volumes:
97+
- ./data/ssl/:/usr/local/share/ca-certificates
98+
# command: ["sh", "-c", "sudo update-ca-certificates && exec ./docker/prod/supervisord"]
99+
100+
101+
volumes:
102+
data:
103+
config:
104+
mysql:
105+
postgres:
106+
107+
networks:
108+
default:
109+
ipam:
110+
driver: default
111+
config:
112+
- subnet: ${DOCKER_SUBNET:-192.168.21.0/24}

0 commit comments

Comments
 (0)