-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Compose reorganized #437
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM mariadb:latest | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.8 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
|
||
RUN pip install --upgrade pip | ||
|
||
ADD requirements.txt . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we going to be keeping this and top-level requirements in sync? Wouldn't it be better to just add the top-level one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seemed to me that the context specified in docker compose yaml file does not let us to load the root lvl requirements. It always gave me an error. I tried it now to be sure and now it works with Which file is better to keep? If we would use only docker, I'd say let's use this one. But we have also possibility to run the app without docker, right? Therefore it would be bad if it were only in docker directory, so I'd keep the root file and this could go away. What do you think? |
||
RUN apt update \ | ||
&& apt install -y memcached libmemcached-dev \ | ||
&& pip install -r requirements.txt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Django>=2.0.0,<2.1 | ||
mysqlclient>=1.3.7,<1.4 | ||
gunicorn | ||
sqlparse | ||
argon2-cffi | ||
bcrypt | ||
pytz | ||
pyyaml | ||
sentry-sdk>=0.14.1 | ||
selenium | ||
whitenoise | ||
django-storages<1.10 | ||
boto3 | ||
django-bmemcached | ||
python-binary-memcached |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
version: '3' | ||
version: '3.9' | ||
|
||
services: | ||
|
||
services: | ||
db: | ||
image: mysql:5.5 | ||
volumes: | ||
- .db:/var/lib/mysql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=docker | ||
- MYSQL_DATABASE=dracidoupe_cz | ||
web: | ||
build: . | ||
command: python3 manage.py runserver 0.0.0.0:8000 | ||
build: | ||
context: .docker/web | ||
dockerfile: Dockerfile | ||
depends_on: | ||
- db | ||
volumes: | ||
- .:/code | ||
ports: | ||
- "8000:8000" | ||
- "32768-65535" | ||
depends_on: | ||
- db | ||
command: /bin/bash -c "python3 manage.py runserver 0.0.0.0:8000" | ||
|
||
db: | ||
build: | ||
context: .docker/database | ||
dockerfile: Dockerfile | ||
volumes: | ||
- .docker/database/.db-data:/var/lib/mysql | ||
environment: | ||
- MARIADB_ROOT_PASSWORD=docker | ||
- MARIADB_DATABASE=dracidoupe_cz | ||
|
||
adminer: | ||
image: adminer | ||
links: | ||
- db | ||
ports: | ||
- 81:80 | ||
- "8080:8080" | ||
depends_on: | ||
- db | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd definitely use a specific version that is on prod. That's currently mysql-5.5, but find the oldest version you can and we'll keep them in sync once we upgrade :)
If there is a way to keep it in sync with the terraform version, that would be golden :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added version 10.0 that should be more or less compatible with mysql-5.5. For local developing mysql 5.5 and mariadb 5.5 do not have official docker images for arm64v8, do they? At least for it is this error: