👷 Set CI with PM2
        Tim Izzo tim@octree.ch
        
        
        
        
        
        Tue, 22 Jun 2021 13:50:46 +0200
        
          3 files changed,
          17 insertions(+),
          17 deletions(-)
          
          
        
            
            
            
            M
            
          
          .dockerignore
          
            → 
            .dockerignore
          
          
            
          @@ -1,17 +1,15 @@
+Dockerfile +.dockerignore +README.md +.gitlab-ci.yml node_modules + backend/node_modules backend/.cache backend/.tmp backend/.db backend/README.md backend/build + frontend/node_modules frontend/.next -.cache -.tmp -.db -k8s -Dockerfile -.dockerignore -README.md -start-timescaledb.sh
            
            
            
            M
            
          
          Dockerfile
          
            → 
            Dockerfile
          
          
            
          @@ -1,10 +1,3 @@
-FROM git.octree.ch:4567/o/infra/templates/base/strapi:nextjs - -ARG VERSION -ENV VERSION ${VERSION:-dev} +FROM git.octree.ch:4567/o/infra/templates/base/strapi:pm2 -COPY backend /srv/app/backend -COPY frontend /srv/app/frontend -COPY ecosystem.config.js /srv/app/ - -CMD cd /srv/app; pm2 start ecosystem.config.js; pm2 logs+COPY . /srv/app
            
            
            
            M
            
          
          ecosystem.config.js
          
            → 
            ecosystem.config.js
          
          
            
          @@ -1,3 +1,5 @@
+const { HOST = "localhost" } = process.env; + module.exports = { apps: [ {@@ -8,6 +10,9 @@ args: "start",
interpreter: "bash", restart_delay: 10000, max_restarts: 10, + env: { + PORT: 80, + }, }, { name: "next",@@ -16,6 +21,10 @@ script: "yarn",
args: "start", interpreter: "bash", restart_delay: 10000, + env: { + PORT: 3000, + STRAPI_URL: `http://${HOST}`, + }, }, ], };