Move to a new server #56

Closed
opened 2026-02-04 16:52:41 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @clemone210 on GitHub (Jan 5, 2021).

Hello,

I successfully used planka in the last month on a my local pc.
I would like to move it now to my server.

This is my docker-compose file. How can I move it to a new server?
Where is the database located?

I run it on a Ubuntu machine.

version: '3.9'

services:

  planka:
    image: meltyshev/planka:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          ./start.sh &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 seconds...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/public/attachments
    ports:
      - 3010:1337
    environment:
      - BASE_URL=https://myurl
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=9MYSECRETKEY
    depends_on:
      - postgres

  postgres:
    image: postgres:alpine
    restart: unless-stopped
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    ports:
      - '5433:5432'

volumes:
  user-avatars:
  project-background-images:
  attachments:
  db-data:
Originally created by @clemone210 on GitHub (Jan 5, 2021). Hello, I successfully used planka in the last month on a my local pc. I would like to move it now to my server. This is my docker-compose file. How can I move it to a new server? Where is the database located? I run it on a Ubuntu machine. ``` version: '3.9' services: planka: image: meltyshev/planka:latest command: > bash -c "for i in `seq 1 30`; do ./start.sh && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 seconds...\"; sleep 5; done; (exit $$s)" restart: unless-stopped volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/public/attachments ports: - 3010:1337 environment: - BASE_URL=https://myurl - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=9MYSECRETKEY depends_on: - postgres postgres: image: postgres:alpine restart: unless-stopped volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust ports: - '5433:5432' volumes: user-avatars: project-background-images: attachments: db-data: ```
OVERLORD added the documentation label 2026-02-04 16:52:41 +03:00
Author
Owner

@meltyshev commented on GitHub (Jan 6, 2021):

Hi!

  1. Backup all public files: docker run --rm --volumes-from planka_planka_1 -v $(pwd):/backup meltyshev/planka:latest tar cvf /backup/backup.tar /app/public/user-avatars /app/public/project-background-images /app/public/attachments.
  2. Backup database data: docker exec planka_postgres_1 pg_dump -U postgres -c planka > backup.sql.
  3. After these commands, you'll have 2 files in the current folder - move them to the new server.
  4. Restore all public files from the backup: docker run --rm --volumes-from planka_planka_1 -v $(pwd):/backup planka bash -c "cd / && tar xvf /backup/backup.tar --strip 1".
  5. Restore database data from the backup: docker exec -i planka_postgres_1 psql -U postgres -d planka < backup.sql.

Note that you need to change the container name in commands (planka_planka_1, planka_postgres_1) if you have other names.

@meltyshev commented on GitHub (Jan 6, 2021): Hi! 1. Backup all public files: `docker run --rm --volumes-from planka_planka_1 -v $(pwd):/backup meltyshev/planka:latest tar cvf /backup/backup.tar /app/public/user-avatars /app/public/project-background-images /app/public/attachments`. 2. Backup database data: `docker exec planka_postgres_1 pg_dump -U postgres -c planka > backup.sql`. 3. After these commands, you'll have 2 files in the current folder - move them to the new server. 4. Restore all public files from the backup: `docker run --rm --volumes-from planka_planka_1 -v $(pwd):/backup planka bash -c "cd / && tar xvf /backup/backup.tar --strip 1"`. 5. Restore database data from the backup: `docker exec -i planka_postgres_1 psql -U postgres -d planka < backup.sql`. Note that you need to change the container name in commands (`planka_planka_1`, `planka_postgres_1`) if you have other names.
Author
Owner

@mongrelion commented on GitHub (Jan 21, 2021):

I'm not sure if this is truly an "issue" for Planka but rather a limitation in the user's knowledge of the underlying technology so I'd suggest we close this.

@mongrelion commented on GitHub (Jan 21, 2021): I'm not sure if this is truly an "issue" for Planka but rather a limitation in the user's knowledge of the underlying technology so I'd suggest we close this.
Author
Owner

@clemone210 commented on GitHub (Jan 21, 2021):

I'm not sure if this is truly an "issue" for Planka but rather a limitation in the user's knowledge of the underlying technology so I'd suggest we close this.

thats true. I will close it.

@clemone210 commented on GitHub (Jan 21, 2021): > I'm not sure if this is truly an "issue" for Planka but rather a limitation in the user's knowledge of the underlying technology so I'd suggest we close this. thats true. I will close it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#56