You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Use an existing docker file on [GitHub](https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker) (use commit hash cfc5b80ead7f83a7d592e406ef3bd160889683c1).
5
-
The README contains instructions on how to build the docker image.
6
-
7
-
The image is referenced in the provided docker-compose.yml file.
8
-
9
3
## Docker Images for tc-website
10
4
The following docker images are defined:
11
-
* base - located in base sub-directory, used as the base image for build and run images below.
5
+
* base - located in base sub-directory, used as the base image forall images below.
12
6
* build - located in build sub-directory, used to create the jboss and tc website wars ready for deployment.
13
7
* run - located in run sub-directory used to run the jboss created by the build image to run the tc website.
8
+
* httpd - located in httpd sub-directory used to create and run apache httpd server
14
9
15
10
You need to run the following commands to build these images first:
16
11
```
17
-
# Go to the directory extracting this submission
12
+
# Go to the directory *docker/tc-website* extracting this submission
18
13
19
-
docker build -t tc-website:base base
20
-
docker build -t tc-website:build build
21
-
docker build -t tc-website:run run
14
+
docker build -t appiriodevops/tc-website:base base
Update the configuration values in env.sh file from the submission:
45
-
*TC_PLATFORM_SRC_ROOT - the root directory of the tc-platform codebase, point to the tc-platform directory above
46
-
*DEPLOYMENT_DIR - the directory to put the jboss and the created wars.
45
+
*TC_WEBSITE_HOME - the root directory of the tc-website codebase and all its required repos, point to the $TC_WEBSITE_HOME directory above
46
+
*JBOSS_DEPLOYMENT_DIR - the directory to put the jboss and the created wars.
47
47
48
48
Run `source env.sh` to create the environment variables.
49
49
50
50
Then run `docker-compose up build-tc-website` to build the code and create jboss and tc-website wars.
51
51
52
-
Finally run `docker-compose up run-tc-website` to run the jboss created above and setup apache.
52
+
Finally run `docker-compose up -d tc-httpd` to run the all required services. To view jboss log run
53
+
`docker-compose logs -f run-tc-website`
54
+
55
+
> NOTE: docker-compose will create custom network with ip network is configurable on *networks* section on ```docker-compose.yml``` file
56
+
> If you change this (subnet or gateway), make sure host ```env.topcoder.com``` on service ```run-tc-website``` point to ip address of gateway
57
+
58
+
## Setup circleci
59
+
Grant circleci access to repo tc-website. If there are any specific configuration related to circleci put it under ```.deploy/circleci```. All files under that directory will be copied to tc-website root before testinf being executed.
53
60
54
-
The console is like this: http://take.ms/wPZwi when it's ready to access the tc-website.
61
+
Any push action will trigger circleci build process.
55
62
56
63
## Verification
57
-
Add the following entry to your hosts file:
58
-
`<docker-ip>local.tc.cloud.topcoder.com`
64
+
Add the following entry to your hosts file:
65
+
`<docker-ip>local.tc.cloud.topcoder.com`
59
66
60
67
Where `<docker-ip>` is the ip address of your docker box. It should be set to `127.0.0.1` on Linux or `192.168.99.100` on Windows/macOS if you are using Docker Toolbox.
61
68
@@ -67,34 +74,34 @@ Where `<docker-ip>` is the ip address of your docker box. It should be set to `1
67
74
4. Now visit https://local.tc.cloud.topcoder.com/tc?module=MyHome - to switch from the main site back to docker.
68
75
69
76
You can now try the following pages:
70
-
TC WAR:
77
+
TC WAR:
71
78
* Open https://local.tc.cloud.topcoder.com/tc?module=MyHome, the page is like: http://take.ms/TYP9F
72
79
* Open https://local.tc.cloud.topcoder.com/tc?module=EditTheme, change to use old theme, the page is like: http://take.ms/efKBr
73
80
* Open https://local.tc.cloud.topcoder.com/tc?module=ActiveContests&pt=39 (code active contests), the page is like: http://take.ms/RxSWZ
74
81
75
-
Note that the links like https://local.tc.cloud.topcoder.com/challenges/design/active won't work.
82
+
Note that the links like https://local.tc.cloud.topcoder.com/challenges/design/active won't work.
76
83
77
-
Query WAR:
84
+
Query WAR:
78
85
* Open https://local.tc.cloud.topcoder.com/query/query, the page is like: http://take.ms/UvcrU
79
86
80
-
Admin WAR:
87
+
Admin WAR:
81
88
* Open https://local.tc.cloud.topcoder.com/admin/, the page is like: http://take.ms/nygny
82
89
* Open https://local.tc.cloud.topcoder.com/admin/?module=TermsList, the page is like: http://take.ms/P061N
83
90
84
-
CORP WAR:
91
+
CORP WAR:
85
92
* Open https://local.tc.cloud.topcoder.com/corp/, the page is like: http://take.ms/d6tMF
86
93
87
-
Email WAR:
94
+
Email WAR:
88
95
* Open https://local.tc.cloud.topcoder.com/email/, the page is like: http://take.ms/BNbd5
89
96
90
-
Reg WAR:
97
+
Reg WAR:
91
98
* Open https://local.tc.cloud.topcoder.com/reg/, the page is like: http://take.ms/jkbVm
92
99
93
-
EP WAR:
100
+
EP WAR:
94
101
* Open https://local.tc.cloud.topcoder.com/ep, the page is like: http://take.ms/Nw1bV
95
102
96
-
Private Label WAR:
103
+
Private Label WAR:
97
104
* Open https://local.tc.cloud.topcoder.com/pl/, the page is like: http://take.ms/x3pr5
98
105
99
-
Note that you may receive HTTPS certificate warnings, just ignore it and proceed.
100
-
And you can click around to try the other pages.
106
+
Note that you may receive HTTPS certificate warnings, just ignore it and proceed.
0 commit comments