File tree 5 files changed +14
-9
lines changed
5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
TOKEN = abc123
2
+ PORT = 3000
3
+ PORTS = 3000:3000
2
4
# DEBUG=DISABLE
Original file line number Diff line number Diff line change
1
+ PORT = 3000
2
+ HOST = 0.0.0.0
Original file line number Diff line number Diff line change @@ -21,21 +21,21 @@ RUN pip install docker-compose
21
21
# RUN apk add --no-cache make gcc g++ python
22
22
23
23
# Bundle app source
24
- COPY . /src
24
+ ENV WORKDIR /src
25
+ COPY . ${WORKDIR}
25
26
26
27
# Change working directory
27
- WORKDIR "/src "
28
+ WORKDIR "${WORKDIR} "
28
29
29
30
# Install dependencies
30
31
RUN npm install --production
31
32
32
33
# Env variables
33
- ENV SERVER_PORT 3000
34
+ ENV SERVER_PORT ${PORT}
34
35
# ENV TOKEN abc123
35
36
# ENV DEBUG DISABLE
36
37
37
- # Expose 3000
38
- EXPOSE 3000
38
+ EXPOSE ${PORT}
39
39
40
40
# Startup
41
41
ENTRYPOINT npm start
Original file line number Diff line number Diff line change 1
- version : ' 2 '
1
+ version : ' 3 '
2
2
services :
3
3
dockerhub :
4
4
image : maccyber/micro-dockerhub-hook
5
5
# build: .
6
+ environment :
7
+ - PORT=${PORT}
6
8
ports :
7
- - " 3000:3000"
8
- env_file : docker.env
9
+ - " ${PORT}:${PORT}"
9
10
volumes :
10
11
- ./scripts:/src/scripts
11
12
- /var/run/docker.sock:/var/run/docker.sock
Original file line number Diff line number Diff line change 4
4
"description" : " docker hub webhook" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "start" : " micro" ,
7
+ "start" : " micro -l tcp://${npm_config_HOST}:${npm_config_PORT} " ,
8
8
"dev" : " micro-dev -H localhost" ,
9
9
"test" : " standard && ava" ,
10
10
"coverage" : " nyc ava" ,
You can’t perform that action at this time.
0 commit comments