Skip to content

Commit cba65a4

Browse files
committed
Merge branch 'master' of https://github.com/keiffster/program-y
2 parents 4e10689 + 856f799 commit cba65a4

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

Docker/program-y/Centos/remote-git-y-bot-flask-rest/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,22 @@ docker run -t -i -p 80:80 ohoachuck/program-y-git-y-bot-webchat
1212
```
1313
to do so I did nothing complicated, and just wrote a simple Dockerfile
1414

15-
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.
15+
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.
16+
17+
## Build your own image
18+
19+
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:
20+
```bash
21+
docker build -t <your-prefered-image-name> .
22+
```
23+
24+
## Run your own container from image
25+
26+
Once you have built your own imgage run your container for access through port 80 (http://localhost) like so:
27+
```bash
28+
docker run -t -i -p 8080:80 <your-prefered-image-name>
29+
```
30+
or alternatively you can choose to map same PORT as the container port 8080 (http://localhost:8080) like so:
31+
```bash
32+
docker run -t -i -p 8080:8080 <your-prefered-image-name>
33+
```

Docker/program-y/Centos/remote-git-y-bot-webchat/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ RUN su -c 'git clone https://github.com/keiffster/program-y.git /home/program-y/
3131
# Get pip to download and install requirements:
3232
RUN pip3.6 install -r /home/program-y/program-y/requirements.txt
3333

34-
# Expose ports for webchat if launched as program-y user (access through http://localhost:8080)
35-
# EXPOSE 8080
36-
37-
# Expose ports for webchat if launched as root user (access through http://localhost:80)
38-
EXPOSE 80
34+
# Expose ports for webchat if launched as program-y user
35+
EXPOSE 8080
3936

4037
# Copy the launch script inside the container
4138
# 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

Docker/program-y/Centos/remote-git-y-bot-webchat/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,22 @@ docker run -t -i -p 80:80 ohoachuck/program-y-git-y-bot-webchat
1212
```
1313
to do so I did nothing complicated, and just wrote a simple Dockerfile
1414

15-
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.
15+
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.
16+
17+
## Build your own image
18+
19+
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:
20+
```bash
21+
docker build -t <your-prefered-image-name> .
22+
```
23+
24+
## Run your own container from image
25+
26+
Once you have built your own imgage run your container for access through port 80 (http://localhost) like so:
27+
```bash
28+
docker run -t -i -p 8080:80 <your-prefered-image-name>
29+
```
30+
or alternatively you can choose to map same PORT as the container port 8080 (http://localhost:8080) like so:
31+
```bash
32+
docker run -t -i -p 8080:8080 <your-prefered-image-name>
33+
```
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/bash
22

33
# Run python sever as program-y user (not root)
4-
#`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`
5-
6-
# Launch Program-y as root, unless default config.yaml file state webchat port is greater than 1024 (ex. 8080)
7-
`cd /home/program-y/program-y/bots/y-bot/ && /home/program-y/program-y/bots/y-bot/y-bot-webchat.sh`
4+
`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 commit comments

Comments
 (0)