Skip to content

Instantly share code, notes, and snippets.

@garethr
Last active September 21, 2017 11:37
Show Gist options
  • Save garethr/301b7548796173b2936cf1d142bba453 to your computer and use it in GitHub Desktop.
Save garethr/301b7548796173b2936cf1d142bba453 to your computer and use it in GitHub Desktop.
Launch a local version of Europa from Distelli using Docker Compose. Ideal for testing or experiments.
USER_PASSWORD=Pa55w0rd
USER_NAME=distelli
ROOT_PASSWORD=S3r10usPa55w0rd
DATABASE_NAME=europadb

So you want to try our Europa locally? Full instructions can be found in the official docs, this example uses a basic compose file.

First launch the mysql service. Unless you launch this first, Europa will exit.

docker-compose up -d mysql

Once MySQL is running we can bring up the Europa container:

docker-compose up

Once that's running we want to grab the HTTP port on which Europa is running:

docker port europa 80

We'll reuse that port as <port> in the following commands.

You should now access the Europa dashboard at http://127.0.0.1:<port>. Setup local file storage by toggling the File System option and providing a path. I used /europa.

Then grab an API Token from http://127.0.0.1:<port>/settings?section=tokens as described in the docker login documentation.

Let's demonstrate the repository is up and running by pushing an image to it. First login using the token we retrieved above.

docker login -u TOKEN -p <token> 127.0.0.1:<port>

Then tag and push an image. I used :

docker pull nginx
docker tag nginx 127.0.0.1:<port>/nginx
docker push 127.0.0.1:<port>/nginx
version: '3'
services:
mysql:
image: mysql/mysql-server:5.7
environment:
- MYSQL_ROOT_PASSWORD=${ROOT_PASSWORD}
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${USER_NAME}
- MYSQL_PASSWORD=${USER_PASSWORD}
europa:
image: distelli/europa:latest
environment:
- EUROPA_DB_ENDPOINT=mysql://mysql:3306/${DATABASE_NAME}
- EUROPA_DB_USER=${USER_NAME}
- EUROPA_DB_PASS=${USER_PASSWORD}
ports:
- 80
- 443
depends_on:
- mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment