Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
391 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# translate/pootle:base | ||
# | ||
# VERSION 0.0.1 | ||
|
||
FROM translate/pootle:root | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
ENV POOTLE_LOG_DIR="$INSTALL_DIR/var/logs" | ||
|
||
COPY ./install-base /usr/local/bin | ||
RUN ./usr/local/bin/install-base | ||
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||
EXPOSE 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Add local user | ||
# Either use the LOCAL_USER_ID if passed in at runtime or | ||
# fallback | ||
|
||
USER_ID=${LOCAL_USER_ID:$UID} | ||
|
||
echo "Starting with UID : $USER_ID" | ||
usermod -o -u $USER_ID pootle | ||
export HOME=/home/pootle | ||
exec gosu pootle "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
apt-get update -qq | ||
apt-get install \ | ||
-y -qq \ | ||
--no-install-recommends \ | ||
gettext \ | ||
gosu \ | ||
make \ | ||
python-dev | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# translate/pootle:base | ||
# | ||
# VERSION 0.0.1 | ||
|
||
FROM translate/pootle:root | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
COPY ./install-build /usr/local/bin | ||
RUN ./usr/local/bin/install-build | ||
|
||
USER pootle | ||
|
||
COPY ./install-virtualenv /usr/local/bin | ||
RUN ./usr/local/bin/install-virtualenv | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
apt-get update -qq | ||
apt-get install -y -qq \ | ||
build-essential \ | ||
coreutils \ | ||
libjpeg-dev \ | ||
libfreetype6-dev \ | ||
liblcms2-dev \ | ||
libtiff5-dev \ | ||
libwebp-dev \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
python-dev \ | ||
zlib1g-dev | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
INSTALL_DIR=$(readlink -f --canonicalize $(eval echo $INSTALL_DIR)) | ||
|
||
mkdir -p $INSTALL_DIR | ||
|
||
cd $INSTALL_DIR | ||
|
||
function get_requirement () { | ||
curl -sO https://raw.githubusercontent.com/translate/pootle/master/requirements/$1.txt | ||
} | ||
|
||
mkdir requirements | ||
cd requirements | ||
declare -a requirements=("_es_5" "base" "dev" "tests" "_docs" "lint") | ||
for i in "${requirements[@]}" | ||
do | ||
get_requirement "$i" | ||
done | ||
cd .. | ||
|
||
virtualenv . | ||
. bin/activate \ | ||
&& pip install --no-cache-dir -qr requirements/dev.txt \ | ||
&& pip install --no-cache-dir -qr requirements/_es_5.txt \ | ||
&& pip install --no-cache-dir -q \ | ||
codecov==2.0.15 \ | ||
coverage==4.5.1 \ | ||
coveralls==1.3.0 \ | ||
&& pyclean . | ||
|
||
cd $INSTALL_DIR | ||
curl -s -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | ||
. ~/.nvm/nvm.sh | ||
|
||
nvm install node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# translate/pootle:dev-mariadb | ||
# | ||
# VERSION 0.0.1 | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
# Build stage | ||
FROM translate/pootle:build | ||
|
||
COPY ./settings.conf /tmp/ | ||
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ | ||
&& apt-get update -qq \ | ||
&& apt-get install -qq -y \ | ||
--no-install-recommends \ | ||
libmariadbclient-dev-compat | ||
USER pootle | ||
RUN bash -c " \ | ||
cd "$INSTALL_DIR" \ | ||
&& . bin/activate \ | ||
&& pip install -q \ | ||
MySQL-python \ | ||
&& cp /tmp/settings.conf \ | ||
/home/pootle/pootle_env/pootle.conf" | ||
|
||
# Mariadb dev | ||
FROM translate/pootle:base | ||
|
||
ENV POOTLE_ENV=mariadb | ||
RUN apt-get update -qq \ | ||
&& apt-get install -qq -y \ | ||
--no-install-recommends \ | ||
libmariadbclient18 \ | ||
mariadb-client | ||
COPY --chown=pootle:pootle --from=0 /home/pootle/ /home/pootle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Sample configuration file. | ||
|
||
This file includes the settings that administrators will likely change. | ||
You can find the defaults in the ``*.conf`` files for more advanced settings. | ||
""" | ||
|
||
import glob | ||
import os | ||
|
||
from pootle.i18n.gettext import ugettext_lazy as _ | ||
|
||
|
||
POOTLE_TITLE = _(u'Pootle Translation Server') | ||
TIME_ZONE = 'UTC' | ||
SECRET_KEY = 'SECRETKEY' | ||
ALLOWED_HOSTS = [ | ||
'127.0.0.1', | ||
'localhost', | ||
#'${your_server}', | ||
] | ||
POOTLE_CANONICAL_URL = "http://localhost" | ||
DEFAULT_FROM_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_ENABLED = True | ||
POOTLE_CONTACT_REPORT_EMAIL = 'string_errors_manager@YOUR_DOMAIN.com' | ||
POOTLE_EMAIL_FEEDBACK_ENABLED = False | ||
POOTLE_MARKUP_FILTER = ('markdown', {}) | ||
POOTLE_MT_BACKENDS = [ | ||
# ('CAIGHDEAN_TRANSLATE', ''), | ||
# ('GOOGLE_TRANSLATE', ''), | ||
# ('WELSH_TRANSLATE', ''), | ||
# ('YANDEX_TRANSLATE', ''), | ||
] | ||
|
||
|
||
DATABASES['default']['ENGINE'] = 'django.db.backends.mysql' | ||
DATABASES['default']['NAME'] = 'pootle' | ||
DATABASES['default']['USER'] = 'travis' | ||
DATABASES['default']['TEST'] = dict( | ||
COLLATION='utf8_general_ci', | ||
NAME='', | ||
CHARSET='utf8') | ||
DATABASES['default']['OPTIONS'] = { | ||
'init_command': "SET sql_mode='STRICT_ALL_TABLES'"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SECRET_KEY=insert_random_key | ||
DJANGO_DEV=True | ||
DJANGO_DEBUG=True | ||
SITE_URL=http://localhost:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# translate/pootle:dev-postgres | ||
# | ||
# VERSION 0.0.1 | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
# Build stage | ||
FROM translate/pootle:build | ||
|
||
COPY ./settings.conf /tmp/ | ||
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ | ||
&& apt-get update -qq \ | ||
&& apt-get install -qq -y \ | ||
--no-install-recommends \ | ||
libpq-dev | ||
USER pootle | ||
RUN bash -c " \ | ||
cd "$INSTALL_DIR" \ | ||
&& . bin/activate \ | ||
&& pip install -q \ | ||
psycopg2-binary \ | ||
&& cp /tmp/settings.conf \ | ||
/home/pootle/pootle_env/pootle.conf" | ||
|
||
# Postgres dev | ||
FROM translate/pootle:base | ||
|
||
ENV POOTLE_ENV=postgres | ||
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ | ||
&& apt-get update -qq \ | ||
&& apt-get install -qq -y \ | ||
--no-install-recommends \ | ||
postgresql-client | ||
COPY --chown=pootle:pootle --from=0 /home/pootle/ /home/pootle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Sample configuration file. | ||
|
||
This file includes the settings that administrators will likely change. | ||
You can find the defaults in the ``*.conf`` files for more advanced settings. | ||
""" | ||
|
||
import glob | ||
import os | ||
|
||
from pootle.i18n.gettext import ugettext_lazy as _ | ||
|
||
|
||
|
||
POOTLE_TITLE = _(u'Pootle Translation Server') | ||
TIME_ZONE = 'UTC' | ||
SECRET_KEY = 'SECRETKEY' | ||
ALLOWED_HOSTS = [ | ||
'127.0.0.1', | ||
'localhost', | ||
#'${your_server}', | ||
] | ||
POOTLE_CANONICAL_URL = "http://localhost" | ||
DEFAULT_FROM_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_ENABLED = True | ||
POOTLE_CONTACT_REPORT_EMAIL = 'string_errors_manager@YOUR_DOMAIN.com' | ||
POOTLE_EMAIL_FEEDBACK_ENABLED = False | ||
POOTLE_MARKUP_FILTER = ('markdown', {}) | ||
POOTLE_MT_BACKENDS = [ | ||
# ('CAIGHDEAN_TRANSLATE', ''), | ||
# ('GOOGLE_TRANSLATE', ''), | ||
# ('WELSH_TRANSLATE', ''), | ||
# ('YANDEX_TRANSLATE', ''), | ||
] | ||
TEMPLATES[0]['DIRS'] = [ | ||
# working_path(os.path.join('custom', 'templates')), | ||
] | ||
|
||
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql' | ||
DATABASES['default']['NAME'] = 'pootle' | ||
DATABASES['default']['USER'] = 'postgres' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SECRET_KEY=insert_random_key | ||
DJANGO_DEV=True | ||
DJANGO_DEBUG=True | ||
SITE_URL=http://localhost:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# translate/pootle:dev-sqlite | ||
# | ||
# VERSION 0.0.1 | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
# Build stage | ||
FROM translate/pootle:build | ||
|
||
COPY ./settings.conf /tmp/ | ||
RUN cp /tmp/settings.conf /home/pootle/pootle_env/pootle.conf | ||
|
||
# Sqlite dev | ||
FROM translate/pootle:base | ||
|
||
ENV POOTLE_ENV=sqlite | ||
RUN apt-get update -qq \ | ||
&& apt-get install -qq -y \ | ||
--no-install-recommends \ | ||
sqlite3 | ||
COPY --chown=pootle:pootle --from=0 /home/pootle/ /home/pootle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Sample configuration file. | ||
|
||
This file includes the settings that administrators will likely change. | ||
You can find the defaults in the ``*.conf`` files for more advanced settings. | ||
""" | ||
|
||
import glob | ||
import os | ||
|
||
from pootle.i18n.gettext import ugettext_lazy as _ | ||
|
||
|
||
POOTLE_TITLE = _(u'Pootle Translation Server') | ||
TIME_ZONE = 'UTC' | ||
SECRET_KEY = 'SECRETKEY' | ||
ALLOWED_HOSTS = [ | ||
'127.0.0.1', | ||
'localhost', | ||
#'${your_server}', | ||
] | ||
POOTLE_CANONICAL_URL = "http://localhost" | ||
DEFAULT_FROM_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_EMAIL = 'info@YOUR_DOMAIN.com' | ||
POOTLE_CONTACT_ENABLED = True | ||
POOTLE_CONTACT_REPORT_EMAIL = 'string_errors_manager@YOUR_DOMAIN.com' | ||
POOTLE_EMAIL_FEEDBACK_ENABLED = False | ||
POOTLE_MARKUP_FILTER = ('markdown', {}) | ||
POOTLE_MT_BACKENDS = [ | ||
# ('CAIGHDEAN_TRANSLATE', ''), | ||
# ('GOOGLE_TRANSLATE', ''), | ||
# ('WELSH_TRANSLATE', ''), | ||
# ('YANDEX_TRANSLATE', ''), | ||
] | ||
TEMPLATES[0]['DIRS'] = [ | ||
# working_path(os.path.join('custom', 'templates')), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SECRET_KEY=insert_random_key | ||
DJANGO_DEV=True | ||
DJANGO_DEBUG=True | ||
SITE_URL=http://localhost:8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# translate/pootle:root | ||
# | ||
# VERSION 0.0.1 | ||
|
||
FROM debian:stretch-slim | ||
|
||
MAINTAINER Ryan Northey <ryan@synca.io> | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
INSTALL_DIR=~/pootle_env \ | ||
POOTLE_PKG='-e git://github.com/translate/pootle#egg=pootle' \ | ||
POOTLE_LOG_DIR="$INSTALL_DIR/var/logs" | ||
|
||
COPY ./install-root /usr/local/bin | ||
COPY ./no-apt-cache /etc/apt/apt.conf.d/02nocache | ||
RUN ./usr/local/bin/install-root |
Oops, something went wrong.