Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/keiffster/program-y
Browse files Browse the repository at this point in the history
  • Loading branch information
keiffster committed Jan 11, 2018
2 parents 4e10689 + 856f799 commit cba65a4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 11 deletions.
20 changes: 19 additions & 1 deletion Docker/program-y/Centos/remote-git-y-bot-flask-rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,22 @@ docker run -t -i -p 80:80 ohoachuck/program-y-git-y-bot-webchat
```
to do so I did nothing complicated, and just wrote a simple Dockerfile

This first Docker exploration might motivate some more experimented folks to move on this ? At least I hope this could help go a bit forward. I will continue my explorations.
This first Docker exploration might motivate some more experimented folks to move on this ? At least I hope this could help go a bit forward. I will continue my explorations.

## Build your own image

You can customise the provided simple Dockerfile and build your own image. To do so make sure you are in directory where Dockerfile is. And use docker basic command CLI:
```bash
docker build -t <your-prefered-image-name> .
```

## Run your own container from image

Once you have built your own imgage run your container for access through port 80 (http://localhost) like so:
```bash
docker run -t -i -p 8080:80 <your-prefered-image-name>
```
or alternatively you can choose to map same PORT as the container port 8080 (http://localhost:8080) like so:
```bash
docker run -t -i -p 8080:8080 <your-prefered-image-name>
```
7 changes: 2 additions & 5 deletions Docker/program-y/Centos/remote-git-y-bot-webchat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ RUN su -c 'git clone https://github.com/keiffster/program-y.git /home/program-y/
# Get pip to download and install requirements:
RUN pip3.6 install -r /home/program-y/program-y/requirements.txt

# Expose ports for webchat if launched as program-y user (access through http://localhost:8080)
# EXPOSE 8080

# Expose ports for webchat if launched as root user (access through http://localhost:80)
EXPOSE 80
# Expose ports for webchat if launched as program-y user
EXPOSE 8080

# Copy the launch script inside the container
# launch.sh is : su -c 'cd /home/program-y/program-y/bots/y-bot/ && /home/program-y/program-y/bots/y-bot/y-bot-webchat.sh' - program-y
Expand Down
20 changes: 19 additions & 1 deletion Docker/program-y/Centos/remote-git-y-bot-webchat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,22 @@ docker run -t -i -p 80:80 ohoachuck/program-y-git-y-bot-webchat
```
to do so I did nothing complicated, and just wrote a simple Dockerfile

This first Docker exploration might motivate some more experimented folks to move on this ? At least I hope this could help go a bit forward. I will continue my explorations.
This first Docker exploration might motivate some more experimented folks to move on this ? At least I hope this could help go a bit forward. I will continue my explorations.

## Build your own image

You can customise the provided simple Dockerfile and build your own image. To do so make sure you are in directory where Dockerfile is. And use docker basic command CLI:
```bash
docker build -t <your-prefered-image-name> .
```

## Run your own container from image

Once you have built your own imgage run your container for access through port 80 (http://localhost) like so:
```bash
docker run -t -i -p 8080:80 <your-prefered-image-name>
```
or alternatively you can choose to map same PORT as the container port 8080 (http://localhost:8080) like so:
```bash
docker run -t -i -p 8080:8080 <your-prefered-image-name>
```
5 changes: 1 addition & 4 deletions Docker/program-y/Centos/remote-git-y-bot-webchat/launch.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash

# Run python sever as program-y user (not root)
#`su -c 'cd /home/program-y/program-y/bots/y-bot/ && /home/program-y/program-y/bots/y-bot/y-bot-webchat.sh' - program-y`

# Launch Program-y as root, unless default config.yaml file state webchat port is greater than 1024 (ex. 8080)
`cd /home/program-y/program-y/bots/y-bot/ && /home/program-y/program-y/bots/y-bot/y-bot-webchat.sh`
`su -c 'cd /home/program-y/program-y/bots/y-bot/ && /home/program-y/program-y/bots/y-bot/y-bot-webchat.sh' - program-y`

0 comments on commit cba65a4

Please sign in to comment.