Skip to content

Production Setup v1

Alexandar83 edited this page Feb 25, 2025 · 10 revisions

This page provides detailed instructions for configuration and deployment of the v1 production environment for The Wall API on Linux and Windows. It outlines the steps for preparing required files, setting up services, and managing the application for a reliable production deployment.

Step-by-step instructions

📝 All console commands in this section must be executed from the folder, where the config folder is placed.

1. Set up the PROD(v1) environment configuration:

  • Ensure the following folder structure and files are placed in a folder of your choice:

    • config/envs/common/redis.conf
    • config/envs/prod/django_secret_key_prod.env
    • config/envs/prod/postgres_prod.env
    • config/envs/prod/redis_prod.env
    • config/envs/prod/the_wall_api_prod.env

    💡 Check the *.example files in the relevant folders of the repository for example configuration values.

2. Set up docker compose:


🗒️ Note: The files and folders outlined in sections 1. and 2. are sufficient to initialize and start the app without any additional files from the repository.

3. Workflow to start and manage the application:

  • 3.1 Start the app, the Redis and PostgreSQL services, the Celery workers and the Celery beat service:

    docker compose -p the-wall-api-prod -f config/docker/docker-compose-prod-v1.yml up -d
    
  • 3.2 Send requests to the API endpoints:

  • 3.3 To stop the app:

    docker compose -p the-wall-api-prod -f config/docker/docker-compose-prod-v1.yml down
    

📌 Action required: To use the other setups, remove all images and volumes, related to the app and the Celery services:

docker volume rm the_wall_api_redis_data_prod
docker volume rm the_wall_api_postgres_data_prod
docker volume rm the_wall_api_celery_beat_schedule_prod
docker volume rm the_wall_api_shared_sim_logs_prod
docker rmi ghcr.io/alexandar83/the-wall-api
docker rmi ghcr.io/alexandar83/celery-lightweight

🗒️ Note: The images for the Redis and PostgreSQL services can be reused in all setups.

💡 Verify that the volumes and images are removed:

docker volume ls
docker images

💡 If either of the images becomes untagged, it has to be removed by its image id:

docker rmi <image_id>

Return to Top
Installation Instructions Index
Home Page


Clone this wiki locally