add Dockerfile for server and frontend
add reddis insigth container for redis management with a slightly hackish way (mounting the server forder inside the container) add working server app with only `docker-compose up`
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
.circleci
|
||||
.nyc_output
|
||||
.vscode
|
||||
coverage
|
||||
|
||||
**/node_modules
|
||||
|
||||
|
||||
npm-debug.log
|
||||
Dockerfile*
|
||||
docker-compose*
|
||||
.dockerignore
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
LICENSE
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# FROM node:14-alpine AS node
|
||||
FROM node:14 AS node
|
||||
|
||||
# -e "NODE_ENV=production"
|
||||
|
||||
FROM node as builder
|
||||
|
||||
WORKDIR /frontend
|
||||
|
||||
COPY ./packages/frontend/package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY ./packages/frontend ./
|
||||
|
||||
RUN npm run build
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./packages/server/package*.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY ./packages/server ./
|
||||
|
||||
# FROM node:14-alpine as final
|
||||
EXPOSE 3000
|
||||
|
||||
# COPY --from=builder /app /app
|
||||
# COPY --from=builder /frontend /frontend
|
||||
|
||||
# WORKDIR /app
|
||||
|
||||
CMD node ./bin/www
|
||||
+29
-6
@@ -2,12 +2,18 @@ version: "3"
|
||||
services:
|
||||
|
||||
# this could be enabled once the server container is added
|
||||
# server:
|
||||
# build:
|
||||
# .
|
||||
# depends_on:
|
||||
# - database
|
||||
# - redis
|
||||
server:
|
||||
build:
|
||||
.
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DEBUG: "*"
|
||||
volumes:
|
||||
- ./packages/server:/app
|
||||
|
||||
database:
|
||||
image: "postgres" # use latest official postgres version
|
||||
@@ -36,6 +42,23 @@ services:
|
||||
image: "redis"
|
||||
ports:
|
||||
- "6379:6379" # It is not neccesary to expose the reddis port if running the app with compose
|
||||
volumes:
|
||||
- redis_volume_data:/data
|
||||
# - ./redis.conf:/tmp/redis.conf
|
||||
# command: [ "redis-server", "/tmp/redis.conf"]
|
||||
|
||||
redis_insight:
|
||||
image: redislabs/redisinsight:latest
|
||||
container_name: redis_insight
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
ports:
|
||||
- 8001:8001
|
||||
volumes:
|
||||
- redis_insight_volume_data:/db
|
||||
|
||||
volumes:
|
||||
speckle-postgres-data: # named volumes can be managed easier using docker-compose
|
||||
redis_volume_data:
|
||||
redis_insight_volume_data:
|
||||
Reference in New Issue
Block a user