# A dockerized badgr-server stack to emulate a production build version: '3.3' services: # this container copies in the project code and runs the app with uwsgi prod_api: build: context: . dockerfile: .docker/Dockerfile.prod.api depends_on: - "prod_db" - "prod_memcached" command: uwsgi --ini uwsgi.ini volumes: - badgr_server_api:/badgr_server # this container runs memcached prod_memcached: image: 'bitnami/memcached:latest' expose: - "11211" # this container runs mysql (database) prod_db: image: mysql:5.6.39 volumes: - badgr_server_prod_db:/var/lib/mysql:rw - ./.docker/etc/init.sql:/docker-entrypoint-initdb.d/init.sql environment: - "MYSQL_PASSWORD=password" - "MYSQL_HOST=db" - "MYSQL_ROOT_PASSWORD=password" expose: - "3306" # this container runs nginx (webserver) and uses the uwsgi app.sock file from prod_api via a volume nginx: build: context: . dockerfile: .docker/Dockerfile.nginx volumes: - badgr_server_api:/badgr_server depends_on: - "prod_api" ports: - "8080:80" volumes: badgr_server_api: badgr_server_prod_db: