https://github.com/ulbora/docker_ulbora_user_service
Ulbora User Micro Service on Docker
https://github.com/ulbora/docker_ulbora_user_service
Last synced: about 1 month ago
JSON representation
Ulbora User Micro Service on Docker
- Host: GitHub
- URL: https://github.com/ulbora/docker_ulbora_user_service
- Owner: Ulbora
- Created: 2017-03-26T16:42:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-21T00:05:42.000Z (over 7 years ago)
- Last Synced: 2025-01-26T13:22:32.874Z (3 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Ulbora User Service
- 1.0.5, latest[ (Dockerfile)](https://github.com/Ulbora/docker_ulbora_user_service/blob/master/Dockerfile)This is Docker Ulbora User Micro Service running on Alpine
# Running
```
docker run -p some-port:8080 --name ulbora-user-service \
--env DATABASE_USER_NAME=some-user-name \
--env DATABASE_USER_PASSWORD=some-user-password \
--env DATABASE_NAME=some-db-name \
--env DATABASE_POOL_SIZE=pool-size \
--env OAUTH2_VALIDATION_URI=oauth2-server \
--env PORT=8080 \
--link some-mysql-container-name:mysql -it \
ulboralabs/userservice sh
```
#### or as a daemon (suggested)
```
docker run -p some-port:8080 --name ulbora-user-service \
--env DATABASE_USER_NAME=some-user-name \
--env DATABASE_USER_PASSWORD=some-user-password \
--env DATABASE_NAME=some-db-name \
--env DATABASE_POOL_SIZE=pool-size \
--env OAUTH2_VALIDATION_URI=oauth2-server \
--env PORT=8080 \
--link some-mysql-container-name:mysql -d \
ulboralabs/userservice sh
```
# Note
### The link to your mysql container should always end with :mysql as shown above
```
--link some-mysql-container-name:mysql
```
The :mysql is an alias that produces an environment variable named MYSQL_PORT_3306_TCP_ADDR inside the web container.
If :mysql were to be changed to :mysqldb, then the environment variable would be named MYSQLDB_PORT_3306_TCP_ADDR and
the User Micro Service would not connect the the mysql database. The User Micro Service needs the environment variable to be
named MYSQL_PORT_3306_TCP_ADDR.### Ports on the host machine should be different for each container
#### Example:
#### -p host-port-number:container-port-number
```
-p 3001:8080
-p 3002:8080
-p 3003:8080
```# Connect to running instance
```
docker exec -it ulboralabs/userservice sh
```