Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from rust:latest

ARG GIT_COMMIT=1dc421474df2a4ee973d529534cd0eb7189d58ce

# Create needed directories
RUN mkdir /app /config
WORKDIR /app
Expand All @@ -16,14 +14,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# Clone syncstorage-rs and build it
RUN git clone https://github.com/mozilla-services/syncstorage-rs ./ \
&& git checkout ${GIT_COMMIT} \
&& cargo install --path ./syncserver --no-default-features --features=syncstorage-db/mysql --locked \
&& cargo install diesel_cli --no-default-features --features 'mysql' \
&& cargo clean

# Setup the Python venv
RUN virtualenv venv \
&& /app/venv/bin/pip install -r requirements.txt \
&& /app/venv/bin/pip3 install flake8 hawkauthlib konfig pyramid pyramid_hawkauth requests simplejson unittest2 WebTest WSGIProxy2 poetry \
&& /app/venv/bin/poetry self add poetry-plugin-export \
&& /app/venv/bin/poetry install --without dev --with tokenserver-unit-tests --no-interaction --no-ansi \
&& /app/venv/bin/pip install -r tools/tokenserver/requirements.txt \
&& /app/venv/bin/pip install pyopenssl==22.1.0

Expand Down
2 changes: 1 addition & 1 deletion app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sleep 5

# First run all migrations
/usr/local/cargo/bin/diesel --database-url "${SYNC_SYNCSTORAGE_DATABASE_URL}" migration --migration-dir syncstorage-mysql/migrations run
/usr/local/cargo/bin/diesel --database-url "${SYNC_TOKENSERVER_DATABASE_URL}" migration --migration-dir tokenserver-db/migrations run
/usr/local/cargo/bin/diesel --database-url "${SYNC_TOKENSERVER_DATABASE_URL}" migration --migration-dir tokenserver-mysql/migrations run

# Parse token server database URL
proto="$(echo $SYNC_TOKENSERVER_DATABASE_URL | grep :// | sed -e's,^\(.*://\).*,\1,g')"
Expand Down