File tree Expand file tree Collapse file tree 5 files changed +149
-13
lines changed Expand file tree Collapse file tree 5 files changed +149
-13
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ FROM build as star-server
27
27
28
28
VOLUME /config
29
29
EXPOSE 5000
30
+ EXPOSE 4009 # NOTE Debug port do not expose in production.
30
31
RUN echo '#!/bin/sh\n \
31
32
set -e\n \
32
33
# Check if /config/init.lisp exists; if not, use /root/init.lisp\n \
Original file line number Diff line number Diff line change
1
+ version : ' 3.8'
2
+ # This is the compose to be used for hacking on gserver
3
+ # No state is set just restart to get to a blank state
4
+ services :
5
+ couchdb :
6
+ container_name : " couchdb"
7
+ hostname : couchdb
8
+ volumes : !reset []
9
+ image : ibmcom/couchdb3
10
+ environment :
11
+ COUCHDB_USER : admin
12
+ COUCHDB_PASSWORD : password
13
+ ports :
14
+ - " 5984:5984"
15
+ networks :
16
+ - star
17
+
18
+ rabbitmq :
19
+ image : rabbitmq:management
20
+ hostname : rabbitmq
21
+ container_name : " rabbitmq"
22
+ environment :
23
+ RABBITMQ_DEFAULT_USER : guest
24
+ RABBITMQ_DEFAULT_PASS : guest
25
+ volumes : !reset []
26
+ ports :
27
+ - " 5672:5672"
28
+ - " 15672:15672"
29
+ networks :
30
+ - star
31
+
32
+ star-server :
33
+ hostname : star-server
34
+ container_name : " star-server"
35
+ restart : always
36
+ build : .
37
+ volumes :
38
+ - ./config:/config
39
+ environment :
40
+ BUILD_MODE : DEV
41
+ ports :
42
+ - " 4009:4009"
43
+ - " 5000:5000"
44
+ networks :
45
+ - star
46
+ - default
47
+ depends_on :
48
+ - couchdb
49
+ - rabbitmq
50
+ extra_hosts :
51
+ - host.docker.internal:host-gateway
52
+
53
+ networks :
54
+ star :
55
+ name : star
56
+ default :
Original file line number Diff line number Diff line change
1
+ version : ' 3.8'
2
+ # This is an example production compose file
3
+ # instead of using a named volume this bind mounds the state for couchdb and rabbitmq to a dir
4
+ # TODO Nginx rev proxy
5
+ services :
6
+ couchdb :
7
+ container_name : " couchdb"
8
+ hostname : couchdb
9
+ image : ibmcom/couchdb3
10
+ volumes :
11
+ - ./state/couchdb:/opt/couchdb/data
12
+ environment :
13
+ # NOTE CHANGE ME
14
+ COUCHDB_USER : admin
15
+ COUCHDB_PASSWORD : password
16
+ ports :
17
+ - " 5984:5984"
18
+ networks :
19
+ - star
20
+
21
+ rabbitmq :
22
+ image : rabbitmq:management
23
+ hostname : rabbitmq
24
+ container_name : " rabbitmq"
25
+ environment :
26
+ # NOTE CHANGEME
27
+ RABBITMQ_DEFAULT_USER : guest
28
+ RABBITMQ_DEFAULT_PASS : guest
29
+ ports :
30
+ - " 5672:5672"
31
+ - " 15672:15672"
32
+ volumes :
33
+ - ./state/rabbitmq:/var/lib/rabbitmq
34
+ networks :
35
+ - star
36
+ star-server :
37
+ hostname : star-server
38
+ container_name : " star-server"
39
+ restart : always
40
+ build : .
41
+ volumes :
42
+ # You can copy example_configs to ./config in order to configure star-server
43
+ - ./config:/config
44
+ ports :
45
+ # port 4009 is a debugging port and you MUST disable it during prod use
46
+ - " 5000:5000"
47
+ networks :
48
+ - star
49
+ - default
50
+ depends_on :
51
+ - couchdb
52
+ - rabbitmq
53
+ extra_hosts :
54
+ - host.docker.internal:host-gateway
55
+
56
+
57
+
58
+ networks :
59
+ star :
60
+ name : star
61
+ default :
62
+ volumes :
63
+ couchdb :
64
+ rabbitmq :
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ services:
6
6
hostname : couchdb
7
7
image : ibmcom/couchdb3
8
8
volumes :
9
- - couchdb_data :/opt/couchdb/data
9
+ - couchdb :/opt/couchdb/data
10
10
environment :
11
11
# NOTE CHANGE ME
12
12
COUCHDB_USER : admin
@@ -27,30 +27,38 @@ services:
27
27
ports :
28
28
- " 5672:5672"
29
29
- " 15672:15672"
30
+ volumes :
31
+ - rabbitmq:/var/lib/rabbitmq
30
32
networks :
31
33
- star
32
34
star-server :
35
+ hostname : star-server
33
36
container_name : " star-server"
34
37
restart : always
35
- image : star-server:latest
36
- hostname : star-server
38
+ build : .
37
39
volumes :
38
- - ./init.lisp:/root/init.lisp
40
+ # You can copy example_configs to ./config in order to configure star-server
41
+ - ./config:/config
39
42
environment :
40
43
BUILD_MODE : DEV
41
44
ports :
45
+ # port 4009 is a debugging port and you MUST disable it during prod use
42
46
- " 5000:5000"
43
47
networks :
44
48
- star
49
+ - default
45
50
depends_on :
46
51
- couchdb
47
52
- rabbitmq
53
+ extra_hosts :
54
+ - host.docker.internal:host-gateway
48
55
49
56
50
57
51
- volumes :
52
- couchdb_data :
53
-
54
58
networks :
55
59
star :
56
60
name : star
61
+ default :
62
+ volumes :
63
+ couchdb :
64
+ rabbitmq :
Original file line number Diff line number Diff line change 1
1
; ; Example config
2
2
(in-package :star )
3
- (format t " Starting starintel...." )
4
- (setq *rabbit-address* " rabbitmq" )
5
- (setq *couchdb-host* " couchdb" )
6
- (setq *couchdb-default-database* " starintel" )
3
+ (format t " Starting starintel....~% " )
4
+ (log :info " RabbitMQ Service: ~a~% " (setf *rabbit-address* " rabbitmq" ))
5
+ (log :info " Couchdb Service: ~a~% " (setf *couchdb-host* " couchdb" ))
6
+ (log :info " Listening On ~a : ~a~% " (setf *http-scheme* " http" ) (setf *http-api-address* " 0.0.0.0" ))
7
+
7
8
; ; You can invoke sylnk like so
8
9
; ; (start-debugger)
9
10
; ; Set log config path to logs
10
- (log :config :daily " logs/gserver.log"
11
+ ; ; here it defaults to the /config/logs/star-server.log
12
+ ; ; Just uncomment this if you want to not use docker the docker volumne
13
+ ; ; TODO Make a docker vol for logs, instead of writing to the config dir SECURITY risk
14
+ ; ; (log:config :daily "./logs/gserver.log"
15
+ ; ; :file2
16
+ ; ; :sane)
17
+ (log :config :daily " /config/logs/gserver.log"
11
18
:file2
12
19
:sane )
13
20
14
- ; ;
21
+
You can’t perform that action at this time.
0 commit comments