Skip to content

Commit

Permalink
Merge pull request #473 from NBISweden/feature/talavis-quick-dev-fix
Browse files Browse the repository at this point in the history
Feature/talavis quick dev fix
  • Loading branch information
viklund committed Oct 8, 2018
2 parents 49b7288 + ba93a9a commit 73a3a19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Dockerfile-frontend-rebuilder
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
ADD . /code
WORKDIR /code

RUN pip3 install --upgrade pip && \
pip3 install -r backend/requirements.txt && \
RUN pip3 install -r backend/requirements.txt && \
pip3 install inotify

CMD ["python", "scripts/watch_frontend.py"]
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,19 @@ Quick development mode

1. Install docker (and docker-compose in case it's not included in the installation)
2. Create test database
2.1. Initiate a mysql data volume by running `./scripts/download_and_create_docker_db_volume.sh`
2.2. Load mysql dummy data by running `./scripts/load_mysql_dummy_data.sh`

1. Initiate a mysql data volume by running `./scripts/create_docker_db_volume_tarball.sh` or
`./scripts/download_and_create_docker_db_volume.sh`

2. Load mysql dummy data by running `./scripts/load_mysql_dummy_data.sh`

3. Copy `settings_sample.json` into `settings.json` and
- Change mysqlSchema into `swefreq_test`.
- Update the credentials for elixir and google oauth.
- Elixir/redirectUri: http://localhost:4000/elixir/login
- redirectUri: http://localhost:4000/login
- Set `mysqlHost` to `db`
- Set `mysqlSchema` to `swefreq_test`
- Clear `mysqlPasswd` (set it to empty `""`)
4. Make a symbolic link from `backend/static` to `static`.
5. Run the server:
```bash
Expand Down
5 changes: 3 additions & 2 deletions scripts/create_docker_db_volume_tarball.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

VOLUME=mysql-data-volume
MYSQL_HOST=127.0.0.1
MYSQL_PASS=rootpw

Expand All @@ -9,8 +10,8 @@ if [ -d mysql-data ]; then
fi

echo 'Creating data volume and starting mysql:5.7 docker container'
docker volume create swefreq-mysql-data >/dev/null
docker run -v swefreq-mysql-data:/var/lib/mysql \
docker volume create "$VOLUME" > /dev/null
docker run -v "$VOLUME":/var/lib/mysql \
--rm --name mysql \
-e MYSQL_ROOT_PASSWORD="$MYSQL_PASS" -d mysql:5.7 >/dev/null

Expand Down

0 comments on commit 73a3a19

Please sign in to comment.