-
-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2306 from Turbo87/ci-docker
Use `docker-compose` setup to fix CI
- Loading branch information
Showing
5 changed files
with
76 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.cache/ | ||
.coverage | ||
.envrc | ||
.git/ | ||
.github/ | ||
.idea/ | ||
.local/ | ||
.vagrant/ | ||
ember/node_modules/ | ||
htdocs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Use Python 2.7 by default, but allow | ||
# e.g. `--build-arg PYTHON_VERSION=3.6` usage | ||
ARG PYTHON_VERSION=2.7 | ||
FROM python:${PYTHON_VERSION} | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install pipenv==v2020.11.15 | ||
|
||
WORKDIR /home/skylines/code/ | ||
|
||
# Install Python dependencies | ||
COPY Pipfile Pipfile.lock /home/skylines/code/ | ||
RUN pipenv install --dev --python=${PYTHON_VERSION} | ||
|
||
# Run the development server by default | ||
CMD ["pipenv", "run", "./manage.py", "runserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: '3.9' | ||
|
||
volumes: | ||
postgres_data: | ||
|
||
services: | ||
db: | ||
image: postgis/postgis:10-2.5 | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_DB: skylines_test | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
ports: | ||
- 5432:5432 | ||
healthcheck: | ||
test: pg_isready -U postgres | ||
interval: 5s | ||
|
||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
healthcheck: | ||
test: redis-cli ping | ||
interval: 5s | ||
|
||
api: | ||
build: . | ||
environment: | ||
PGHOST: db | ||
PGUSER: postgres | ||
PGPASSWORD: postgres | ||
REDIS_URL: redis://redis:6379/0 | ||
ports: | ||
- 5000:5000 | ||
volumes: | ||
- .:/home/skylines/code/ | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
redis: | ||
condition: service_healthy |