Skip to content

Commit

Permalink
Update local_development.md for new servers:start update (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolyncole authored Feb 14, 2025
1 parent 81be1af commit f4e9f03
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions docs/local_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,25 @@ Stop the current Docker container and remove both the container and the image us
```
docker stop mediaflux
docker rm mediaflux
docker rmi pulibraryrdss/mediaflux_dev:latest
```

You can use `docker images` to find out the exact name of the image to delete.
You can also use the docker desktop to delete the image and container.

## Load the new Docker image

1. Log in to docker # See [Ansible Vault](https://github.com/pulibrary/princeton_ansible/blob/main/group_vars/mflux/vault.yml) for docker hub username and password, or check lastpass under "RDSS Docker"
1. Log in to docker # See [Ansible Vault](https://github.com/PrincetonUniversityLibrary/tigerdata-config/blob/main/group_vars/mflux/vault.yml) for docker hub username and password, or check lastpass under "RDSS Docker"

```
export DOCKERHUB_USERNAME="username here"
export DOCKERHUB_PASSWORD="password here"
echo "$DOCKERHUB_PASSWORD" | docker login --username $DOCKERHUB_USERNAME --password-stdin
```

2. _create a container_ with an image from docker hub (notice we name it `mediaflux`)

You can get the list of tag numbers from [Docker Hub](https://hub.docker.com/repository/docker/pulibraryrdss/mediaflux_dev/general)

```
docker create --name mediaflux --mac-address 02:42:ac:11:00:02 --publish 8888:80 pulibraryrdss/mediaflux_dev:{tag_number}
```

3. From now on when you need _start this container_ you can use:
1. Starting the servers (both database and mediaflux). This will not download a new version if you have an existing `mediaflux` container (see `If you have a previous Docker image`)

```
docker start mediaflux
rake servers:start
```

4. Once the container is running you can access it at the default endpoints:
Expand Down

0 comments on commit f4e9f03

Please sign in to comment.