Skip to content
This repository was archived by the owner on Jan 25, 2018. It is now read-only.
Merged
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
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This is designed to be run from fig as part of a
# Marketplace development environment.

# NOTE: this is not provided for production usage.

FROM mozillamarketplace/centos-mysql-mkt:0.1

RUN mkdir -p /pip/{cache,build}
ADD requirements /pip/requirements
WORKDIR /pip
RUN pip install -b /pip/build --download-cache /pip/cache --no-deps -r /pip/requirements/dev.txt

EXPOSE 2602

ENV SOLITUDE_DATABASE mysql://root:@mysql_1:3306/solitude
ENV MEMCACHE_URL memcache_1:11211
12 changes: 12 additions & 0 deletions bin/docker_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Startup script for running Solitude under Docker.

# Check database exists. If not create it first.
mysql -u root --host mysql_1 -e 'use solitude;'
if [ $? -ne 0 ]; then
echo "Solitude database doesn't exist. Let's create it"
mysql -u root --host mysql_1 -e 'create database solitude'
echo "Since we didn't have a db. Lets run the migrations."
schematic migrations/
fi

python manage.py runserver 0.0.0.0:2602
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to specify the host or port here since those are the values it will default to?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do need the host to be that, the default is localhost. Port perhaps not, but this is explicit and specific to the docker setup so I think it's ok. If we don't expose the service on all interfaces the linked services can't see it.