update compose to link memcached correctly
This commit is contained in:
@@ -44,7 +44,8 @@ WORKDIR loader
|
|||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
ENV MEMCACHE_ADDR="localhost:11211"
|
||||||
|
|
||||||
WORKDIR /srv/cprush-stats
|
WORKDIR /srv/cprush-stats
|
||||||
RUN npm install
|
RUN npm install
|
||||||
CMD ["node", "app.js"]
|
CMD ["sh", "-c", "node app.js -m $MEMCACHE_ADDR"]
|
||||||
@@ -34,5 +34,7 @@ app.use('/', (req, res) => {
|
|||||||
|
|
||||||
app.listen(port, async () => {
|
app.listen(port, async () => {
|
||||||
await database.authenticate()
|
await database.authenticate()
|
||||||
return console.log(`Express is listening at http://localhost:${port}`)
|
console.log(`Using memcache at ${memcache_addr}`)
|
||||||
|
console.log(`Express is listening at http://localhost:${port}`)
|
||||||
|
return
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ services:
|
|||||||
image: potato
|
image: potato
|
||||||
networks:
|
networks:
|
||||||
- cprush-net
|
- cprush-net
|
||||||
|
environment:
|
||||||
|
- MEMCACHE_ADDR=memcache:11211
|
||||||
ports:
|
ports:
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user