diff --git a/Dockerfile b/Dockerfile index 66e098d..18a5165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use an official Node.js runtime as a parent image -FROM node:18-alpine +FROM node:22-alpine # Install Python, make, and g++ to allow native module compilation RUN apk add --no-cache python3 make g++ diff --git a/docker-compose.yml b/docker-compose.yml index ad19232..bd094c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,33 +6,38 @@ networks: services: app: + restart: always build: context: . ports: - '3001:3001' environment: - - MONGO_URL=mongodb://mongo:27017/testdb + - MONGO_URL=${MONGO_URL} + - PUBLIC_VAPID_KEY=${PUBLIC_VAPID_KEY} + - PRIVATE_VAPID_KEY=${PRIVATE_VAPID_KEY} + - WEB_PUSH_EMAIL=${WEB_PUSH_EMAIL} + - EMAILPASS=${EMAILPASS} - PORT=3001 volumes: - .:/app - '/app/node_modules' - depends_on: - - mongo - command: nodemon - networks: - - emi-network + #depends_on: + # - mongo + command: node index.js + # networks: + # - emi-network - mongo: - image: mongo:latest - ports: - - '27017:27017' - networks: - - emi-network - volumes: - - mongodbdata:/data/db - - ./dump:/dump + #mongo: + # image: mongo:latest + # ports: + # - '27017:27017' + # networks: + # - emi-network + # volumes: + # - mongodbdata:/data/db + # - ./dump:/dump #entrypoint: mongodump ${MONGO_URL} && mongorestore --db EMI_SOCIAL dump/EMI_SOCIAL/ && mongod -volumes: - mongodbdata: - driver: local # This ensures the volume is created \ No newline at end of file +#volumes: + #mongodbdata: + # driver: local # This ensures the volume is created \ No newline at end of file