Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit c4d22c7

Browse files
committed
Merge branch 'production'
2 parents 03a2dfd + 8ed9484 commit c4d22c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1035
-100
lines changed

bin/init.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
set -eux
44

55
sudo docker compose exec app-zotprime-dataserver sh -cux 'cd /var/www/zotero/misc && ./init-mysql.sh'
6-
#sudo docker compose exec app-zotprime-dataserver sh -cux 'cd /var/www/zotero/misc && ./db_update.sh'
7-
#sudo docker compose exec app-zotprime-dataserver sh -cux 'cd /var/www/zotero/misc/db-updates/2021-10-16 && php ./0_addMasterGroupHasData'
8-
#sudo docker compose exec app-zotprime-dataserver sh -cux 'cd /var/www/zotero/misc/db-updates/2021-10-16 && php ./1_removeMasterGroupTimestampAndVersion'
6+
sudo docker compose exec app-zotprime-dataserver sh -cux 'cd /var/www/zotero/misc && ./db_update.sh'
97
sudo docker compose exec app-zotprime-dataserver sh -cux 'aws --endpoint-url "http://minio:9000" s3 mb s3://zotero'
108
sudo docker compose exec app-zotprime-dataserver sh -cux 'aws --endpoint-url "http://minio:9000" s3 mb s3://zotero-fulltext'
119
sudo docker compose exec app-zotprime-dataserver sh -cux 'aws --endpoint-url "http://localstack:4575" sns create-topic --name zotero'

client.Dockerfile.dockerignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ clinet/zotero-standalone-build/dist
1212
clinet/zotero-standalone-build/staging
1313
clinet/zotero-standalone-build/xulrunner
1414
clinet/zotero-standalone-build/pdftools
15+
*.Dockerfile
1516
.github
1617
bin
1718
build
1819
dataserver
1920
doc
2021
docker
22+
docker-compose.yml
23+
README.md
2124
stream-server
2225
tinymce-clean-server
2326
Zend
24-
docker-compose.yml
25-
*.Dockerfile
26-
README.md
27+
zotprime-k8s
28+

clientbuildtest.Dockerfile.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ build
44
dataserver
55
doc
66
docker
7+
docker-compose.yml
78
stream-server
89
tinymce-clean-server
910
Zend
10-
docker-compose.yml
11+
zotprime-k8s
1112

docker-compose.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,62 @@ services:
1010
- MYSQL_PASSWORD=${MYSQLPASSWORD}
1111
volumes:
1212
- dbdata:/var/lib/mysql
13+
- /etc/localtime:/etc/localtime:ro
1314
db-zotprime-elasticsearch:
1415
# image: docker.elastic.co/elasticsearch/elasticsearch:5.3.0
15-
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
16-
environment:
17-
- cluster.name=zotero
18-
- xpack.security.enabled=false
19-
- cluster.routing.allocation.disk.threshold_enabled=false
16+
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
17+
environment:
18+
- cluster.name=zotero
19+
- xpack.security.enabled=false
20+
- cluster.routing.allocation.disk.threshold_enabled=false
2021
# - cluster.routing.allocation.disk.watermark.flood_stage=500mb
21-
- discovery.type=single-node
22+
- discovery.type=single-node
23+
volumes:
24+
- /etc/localtime:/etc/localtime:ro
2225
# privileged: true
2326
#user: root
2427
#command: "sysctl -w vm.max_map_count=262144 && su elasticsearch -c bin/elasticsearch"
2528
# sysctls:
2629
# - vm.max_map_count=262144
2730
# command: "sysctl -w vm.max_map_count=262144"
2831
db-zotprime-redis:
29-
image: redis:5.0
32+
image: redis:5.0
3033
# privileged: true
3134
# user: root
3235
# sysctls:
3336
# - sysctl vm.overcommit_memory=1
37+
volumes:
38+
- /etc/localtime:/etc/localtime:ro
3439
db-zotprime-memcached:
35-
image: memcached:1.5
40+
image: memcached:1.5
41+
volumes:
42+
- /etc/localtime:/etc/localtime:ro
3643
db-zotprime-localstack:
3744
image: atlassianlabs/localstack
3845
environment:
3946
- SERVICES=sns,sqs,apigateway
47+
volumes:
48+
- /etc/localtime:/etc/localtime:ro
4049
db-zotprime-minio:
41-
# image: minio/minio
4250
build:
4351
context: .
4452
dockerfile: minio.Dockerfile
4553
environment:
4654
- MINIO_ACCESS_KEY=zotero
4755
- MINIO_SECRET_KEY=zoterodocker
4856
command: server /data
57+
ports:
58+
- "8082:9000"
59+
volumes:
60+
- /etc/localtime:/etc/localtime:ro
4961
app-zotprime-dataserver:
5062
image: app-zotprime-dataserver
5163
build:
5264
context: .
5365
dockerfile: ds.Dockerfile
5466
ports:
5567
- "8080:80"
56-
# - "8081:81"
57-
- "8082:8082"
68+
# - "8082:8082"
5869
volumes:
5970
- "./dataserver/:/var/www/zotero:rw"
6071
- "./docker/dataserver/config/config.inc.php:/var/www/zotero/include/config/config.inc.php:ro"
@@ -63,13 +74,14 @@ services:
6374
- "./docker/dataserver/config/header.inc.php:/var/www/zotero/include/header.inc.php:ro"
6475
- "./docker/dataserver/config/Storage.inc.php:/var/www/zotero/model/Storage.inc.php:ro"
6576
- "./docker/dataserver/dbinit/init-mysql.sh:/var/www/zotero/misc/init-mysql.sh:ro"
66-
# - "./docker/dataserver/dbinit/db_update.sh:/var/www/zotero/misc/db_update.sh:ro"
77+
- "./docker/dataserver/dbinit/db_update.sh:/var/www/zotero/misc/db_update.sh:ro"
6778
- "./docker/dataserver/dbinit/www.sql:/var/www/zotero/misc/www.sql:ro"
6879
- "./docker/dataserver/dbinit/shard.sql:/var/www/zotero/misc/shard.sql:ro"
6980
- "./docker/dataserver/config/create-user.sh:/var/www/zotero/admin/create-user.sh:ro"
81+
- /etc/localtime:/etc/localtime:ro
7082
environment:
71-
- RUN_USER=www-data
72-
- RUN_GROUP=www-data
83+
- RUN_USER=apache
84+
- RUN_GROUP=apache
7385
depends_on:
7486
- db-zotprime-mysql
7587
- db-zotprime-elasticsearch
@@ -99,6 +111,8 @@ services:
99111
- db-zotprime-memcached
100112
links:
101113
- db-zotprime-redis:redis
114+
volumes:
115+
- /etc/localtime:/etc/localtime:ro
102116
restart: always
103117
app-zotprime-streamserver:
104118
image: app-zotprime-streamserver
@@ -109,6 +123,7 @@ services:
109123
- "8081:81"
110124
volumes:
111125
- "./docker/stream-server/default.js:/usr/src/app/config/default.js:ro"
126+
- /etc/localtime:/etc/localtime:ro
112127
restart: always
113128
depends_on:
114129
- db-zotprime-mysql
@@ -125,6 +140,8 @@ services:
125140
- PMA_HOST=mysql
126141
links:
127142
- db-zotprime-mysql:mysql
143+
volumes:
144+
- /etc/localtime:/etc/localtime:ro
128145

129146
volumes:
130147
dbdata:

docker/dataserver/config/config.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Z_CONFIG {
2424
public static $AWS_REGION = 'us-east-1';
2525
public static $AWS_ACCESS_KEY = 'zotero'; // leave credentials empty to use IAM role
2626
public static $AWS_SECRET_KEY = 'zoterodocker';
27-
public static $S3_ENDPOINT = 'localhost:8082';
27+
public static $S3_ENDPOINT = 'minio:9000';
2828
public static $S3_BUCKET = 'zotero';
2929
public static $S3_BUCKET_CACHE = '';
3030
public static $S3_BUCKET_FULLTEXT = 'zotero-fulltext';
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
#!/usr/bin/env bash
2-
set -xue
1+
#!/bin/sh
2+
set -uex
33

4-
for i in db-updates/*/; do
5-
cd /var/www/zotero/misc/$i
6-
for j in *; do
7-
find . -type f \( ! -name *.sql \) -exec php {} \;
8-
find . -type f -name *.sql -exec bash -c 'mysql -h mysql -P 3306 -u root -pzotero zotero_master < {}' \;
9-
done
10-
done;
11-
cd ../../
4+
MYSQL="mysql -h mysql -P 3306 -u root -pzotero"
5+
echo "ALTER TABLE libraries ADD hasData TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER version , ADD INDEX ( hasData )" | $MYSQL zotero_master
6+
echo "UPDATE libraries SET hasData=1 WHERE version > 0 OR lastUpdated != '0000-00-00 00:00:00'" | $MYSQL zotero_master
7+
echo "ALTER TABLE libraries DROP COLUMN lastUpdated, DROP COLUMN version" | $MYSQL zotero_master
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -xue
3+
4+
for i in db-updates/*/; do
5+
cd /var/www/zotero/misc/$i
6+
for j in *; do
7+
find . -type f \( ! -name *.sql \) -exec php {} \;
8+
find . -type f -name *.sql -exec bash -c 'mysql -h mysql -P 3306 -u root -pzotero zotero_master < {}' \;
9+
done
10+
done;
11+
cd ../../

docker/dataserver/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export APACHE_LOG_DIR=/var/log/apache2
1212
#/etc/init.d/rsyslog start
1313

1414
# Start rinetd
15-
echo "logfile /dev/stdout" >> /etc/rinetd.conf
16-
rinetd -f -c /etc/rinetd.conf &
15+
#echo "logfile /dev/stdout" >> /etc/rinetd.conf
16+
#rinetd -f -c /etc/rinetd.conf &
1717
#/etc/init.d/rinetd start
1818

1919
#a2enmod headers

0 commit comments

Comments
 (0)