Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/maven/fixes/7.0' into maven/rele…
Browse files Browse the repository at this point in the history
…ase/7.0
  • Loading branch information
metaventis-build committed Mar 13, 2023
2 parents a3ca62e + 10766b6 commit e305491
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 997 deletions.
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#php
config.php
php/src/tools/onlyoffice/storage
!php/src/tools/onlyoffice/storage/templates
assets/private.key
assets/public.key
service/src/main/php/data/
service/src/main/php/src/tools/onlyoffice/storage
!service/src/main/php/src/tools/onlyoffice/storage/templates
service/src/main/assets/private.key
service/src/main/assets/public.key
composer.phar
php/composer.lock
composer.lock
composerinstaller.php
vendor
log
!log/.gitkeep
Expand Down Expand Up @@ -33,4 +35,4 @@ buildNumber.properties
THIRD-PARTY*.txt

# Dotenv
.env
.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
DATABASE_USER: "${SERVICES_EDU_CONNECTOR_DATABASE_USER:-connector}"
DATABASE_PASSWORD: "${SERVICES_EDU_CONNECTOR_DATABASE_PASS:-connector}"
volumes:
- "services-edu-connector-data:/var/www/html/data"
- "services-edu-connector-data:/var/data"
depends_on:
- services-edu-connector-database
ports:
Expand Down
5 changes: 4 additions & 1 deletion deploy/docker/compose/src/main/compose/1_connector-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ services:

services-edu-connector-service:
volumes:
- "${GIT_ROOT}/services-connector/service/src/main/php/vendor:/var/www/html/vendor"
- type: bind
source: ${GIT_ROOT}/services-connector/service/src/main/php/vendor
target: /var/www/html/vendor

- "${GIT_ROOT}/services-connector/service/src/main/php/:/var/www/html/"

# - "${GIT_ROOT}/services-connector/service/src/main/php/:/var/www/html/"
Expand Down
8 changes: 5 additions & 3 deletions service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ ARG project_version=dev

ENV PATH /application/bin:$PATH
ENV ROOT /var/www/html
ENV DATA /var/data

WORKDIR $ROOT

COPY --from=builder /var/www/html/css/ css/
Expand All @@ -64,8 +66,8 @@ RUN set -eux \


RUN set -eux \
&& mkdir data \
&& chown -R www-data:www-data data
&& mkdir $DATA \
&& chown -R www-data:www-data $DATA

########################################################################################################################

Expand All @@ -82,7 +84,7 @@ RUN set -eux \
&& adduser www-data appuser

RUN set -eux \
&& chown -R appuser:appuser /etc/apache2 $ROOT
&& chown -R appuser:appuser /etc/apache2 $ROOT $DATA

USER appuser

Expand Down
37 changes: 37 additions & 0 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,41 @@
</plugins>
</build>

<profiles>
<profile>
<id>dev</id>

<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>env.DEV</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>uk.co.codezen</groupId>
<artifactId>composer-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<phpPath>php</phpPath>
<composerJsonPath>${project.basedir}/src/main/php/composer.json</composerJsonPath>
<buildDirectory>${project.basedir}/src/main/php</buildDirectory>
<withDev>true</withDev>
<withOptimisedAutoloader>false</withOptimisedAutoloader>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
6 changes: 3 additions & 3 deletions service/src/main/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ connector_database_port=${DATABASE_PORT//\/&/\\&}
connector_database_user=${DATABASE_USER//\/&/\\&}
connector_database_password=${DATABASE_PASSWORD//\/&/\\&}
connector_database_name=${DATABASE_NAME//\/&/\\&}

connector_database_path=${connector_database_host}:${connector_database_port}


# OPTIONALS

only_office_document_server="${ONLYOFFICE_DOCUMENT_SERVER:-}"
Expand All @@ -35,8 +35,8 @@ moodle_base_dir="${MOODLE_BASE_DIR:-}"
moodle_token="${MOODLE_TOKEN:-}"

sed -i "s|define('WWWURL', '.*')|define('WWWURL', '${connector_url}')|g" "${conf}"
sed -i "s|define('DOCROOT', '.*')|define('DOCROOT', '\/var\/www\/html')|g" "${conf}"
sed -i "s|define('DATA', '.*')|define('DATA', '\/var\/www\/html\/data')|g" "${conf}"
sed -i "s|define('DOCROOT', '.*')|define('DOCROOT', '${ROOT}')|g" "${conf}"
sed -i "s|define('DATA', '.*')|define('DATA', '${DATA}')|g" "${conf}"
sed -i "s|define('LOG_MODE', '.*')|define('LOG_MODE', 'stdout')|g" "${conf}"
sed -i "s|define('DBHOST', '.*')|define('DBHOST', '${connector_database_path}')|g" "${conf}"
sed -i "s|define('DBUSER', '.*')|define('DBUSER', '${connector_database_user}')|g" "${conf}"
Expand Down
Loading

0 comments on commit e305491

Please sign in to comment.