You can deploy PythonPublisher using Docker. Follow the steps below to get it running in a Docker container.
- Docker installed on your machine. If not installed, follow the instructions here to install Docker.
Use the Dockerfile provided in the repository to build an image. You can do this by running the following command in the root directory of the project:
docker build -t pythonpublisher .
This command will build a Docker image named pythonpublisher
.
Once the image is built, you can start a container using the following command:
docker run -d \
-v $(pwd)/app/databases:/app/databases \
-v $(pwd)/app/uploads:/app/uploads \
-e ADMIN_PASSWORD=<admin_password> \
-e OPEN_CLOUD_API_KEY=<open_cloud_api_key> \
-e ROBLOX_COOKIE=<roblox_cookie> \
-e PORT=<port_number> \
--name pythonpublisher \
pythonpublisher
In the above command:
-
Replace
<admin_password>
,<open_cloud_api_key>
,<roblox_cookie>
, and<port_number>
with your desired values. -
The
-v
flag is used to mount directories from your host to the Docker container. Here, we are mounting thedatabases
anduploads
directories. -
The
-e
flag is used to set environment variables. -
The
--name
flag is used to assign a name to the container. In this case, the container's name ispythonpublisher
.
Now, your application is running in a Docker container!
If you're running Docker locally, you can access your application at http://localhost:<PORT>
. If you're running Docker on a remote server, replace "localhost" with the server's IP address.
To stop the Docker container, you can use the following command:
docker stop pythonpublisher
To remove the Docker container, you can use the following command:
docker rm pythonpublisher
Please note that this will not delete the data in your mounted directories.