services: sparkyfitness-db: image: postgres:15-alpine restart: always environment: POSTGRES_DB: sparkyfitness_db POSTGRES_USER: sparky POSTGRES_PASSWORD: changeme_db_password volumes: - /docker/sparkyfitness/postgresql:/var/lib/postgresql/data sparkyfitness-server: image: codewithcj/sparkyfitness_server:latest # Use pre-built image environment: SPARKY_FITNESS_LOG_LEVEL: ERROR SPARKY_FITNESS_DB_USER: sparky SPARKY_FITNESS_DB_HOST: sparkyfitness-db # Use the service name 'sparkyfitness-db' for inter-container communication SPARKY_FITNESS_DB_NAME: sparkyfitness_db SPARKY_FITNESS_DB_PASSWORD: changeme_db_password SPARKY_FITNESS_APP_DB_USER: sparky_app SPARKY_FITNESS_APP_DB_PASSWORD: password SPARKY_FITNESS_DB_PORT: 5432 SPARKY_FITNESS_API_ENCRYPTION_KEY: 99f949101cfda019e7a7a844902fcb04c51a1778776cd2a02a5533d850310c1d # Uncomment the line below and comment the line above to use a file-based secret # SPARKY_FITNESS_API_ENCRYPTION_KEY_FILE: /run/secrets/sparkyfitness_api_key JWT_SECRET: "BBRhWgtWhMxpex/hauiy93WlOnBmatjAkezrciLb7CU=" # Uncomment the line below and comment the line above to use a file-based secret # JWT_SECRET_FILE: /run/secrets/sparkyfitness_jwt_secret SPARKY_FITNESS_FRONTEND_URL: "https://sparkyfitness.fireflylab.cc" SPARKY_FITNESS_DISABLE_SIGNUP: true SPARKY_FITNESS_ADMIN_EMAIL: huonghaiduynhim@gmail.com #User with this email can access the admin panel SPARKY_FITNESS_EMAIL_HOST: ${SPARKY_FITNESS_EMAIL_HOST} SPARKY_FITNESS_EMAIL_PORT: ${SPARKY_FITNESS_EMAIL_PORT} SPARKY_FITNESS_EMAIL_SECURE: ${SPARKY_FITNESS_EMAIL_SECURE} SPARKY_FITNESS_EMAIL_USER: ${SPARKY_FITNESS_EMAIL_USER} SPARKY_FITNESS_EMAIL_PASS: ${SPARKY_FITNESS_EMAIL_PASS} SPARKY_FITNESS_EMAIL_FROM: ${SPARKY_FITNESS_EMAIL_FROM} GARMIN_MICROSERVICE_URL: http://sparkyfitness-garmin:8000 # Add Garmin microservice URL restart: always depends_on: - sparkyfitness-db # Backend depends on the database being available volumes: - /docker/sparkyfitness/backup:/app/SparkyFitnessServer/backup # Mount volume for backups - /docker/sparkyfitness/uploads:/app/SparkyFitnessServer/uploads # Mount volume for Profile pictures and excercise images sparkyfitness-frontend: image: codewithcj/sparkyfitness:latest # Use pre-built image ports: - "8010:80" # Map host port 8080 to container port 80 (Nginx) restart: always depends_on: - sparkyfitness-server # Frontend depends on the server #- sparkyfitness-garmin # Frontend depends on Garmin microservice. Enable if you are using Garmin Connect features. # Garmin integration is still work in progress. Enable once table is ready. # sparkyfitness-garmin: # image: codewithcj/sparkyfitness_garmin:latest # container_name: sparkyfitness-garmin # environment: # GARMIN_MICROSERVICE_URL: http://sparkyfitness-garmin:${GARMIN_SERVICE_PORT} # GARMIN_SERVICE_PORT: ${GARMIN_SERVICE_PORT} # GARMIN_SERVICE_IS_CN: ${GARMIN_SERVICE_IS_CN} # set to true for China region. Everything else should be false. Optional - defaults to false # networks: # - sparkyfitness-network # restart: unless-stopped # depends_on: # - sparkyfitness-db # - sparkyfitness-server