diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..0aeb73929 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,49 @@ +version: "3.7" +services: + + db: + platform: linux/x86_64 + image: mysql:8.0 + volumes: + - database:/var/lib/mysql + environment: + MYSQL_ROOT_PASSWORD: ubyssey + MYSQL_DATABASE: ubyssey + ports: + - "3307:3306" + healthcheck: + test: "/usr/bin/mysql --user=root --password=ubyssey --execute \"SHOW DATABASES;\"" + interval: 2s + timeout: 20s + retries: 20 + + django: + image: ubyssey/ubyssey.ca:latest + command: > + bash -c "python manage.py migrate + && python manage.py runserver 0.0.0.0:8000" + environment: + DEBUG: True + DJANGO_SETTINGS_MODULE: config.settings.production + GS_ACCESS_KEY_ID: ${GS_ACCESS_KEY_ID} + GS_SECRET_ACCESS_KEY: ${GS_SECRET_ACCESS_KEY} + ports: + - "8000:8000" + - "4444:4444" + depends_on: + db: + condition: service_healthy + restart: true + stdin_open: true + tty: true + + cache: + platform: linux/x86_64 + image: memcached:1.6.10 + ports: + - "11211:11211" + depends_on: + - django + +volumes: + database: