Skip to content

Commit 9f81c67

Browse files
committed
move static docker config to cc-legal-tools-data (so it can be reused)
1 parent a9fb080 commit 9f81c67

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

.env

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Remember to also update the GitHub Actions configuration, as appropriate:
2+
# cc-legal-tools-app/.github/workflows/pre-commit.yml
3+
4+
# https://docs.docker.com/compose/extends/#multiple-compose-files
5+
# https://docs.docker.com/compose/reference/envvars/
6+
COMPOSE_PATH_SEPARATOR=:
7+
COMPOSE_FILE=docker-compose.yml:../cc-legal-tools-data/docker-compose.yml
8+
9+
# https://docs.docker.com/compose/environment-variables/
10+
DJANGO_SETTINGS_MODULE=cc_legal_tools.settings.local
11+
PORT_APP=8005
12+
PORT_STATIC=8006
13+
RELPATH_DATA=../cc-legal-tools-data

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ build/
1818
*/settings/local.py
1919

2020
# Environments
21-
.env
2221
.local
2322
.venv
2423
env/

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# syntax=docker/dockerfile:1
1+
# https://docs.docker.com/engine/reference/builder/
22
# https://hub.docker.com/_/python/
33
FROM python:3.9
44
ENV PYTHONUNBUFFERED=1

cc_legal_tools/settings/local.example.py

+3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
# First-party/Local
55
from cc_legal_tools.settings.dev import * # noqa: F401, F403
66

7+
DEBUG = True
8+
79
# Override settings here
10+
ALLOWED_HOSTS = ["*"]
811
# TRANSIFEX["API_TOKEN"] = "TRANSIFEX_API_TOKEN" # noqa: F405
912
# TRANSLATION_REPOSITORY_DEPLOY_KEY = os.path.join(
1013
# os.path.expanduser("~"), ".ssh", "PRIVATE_KEY_NAME",

docker-compose.yml

+8-17
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,22 @@
11
# Remember to also update the GitHub Actions configuration, as appropriate:
22
# cc-legal-tools-app/.github/workflows/pre-commit.yml
3+
#
4+
# Also see:
5+
# .env
6+
# Dockerfile
37

48
version: "3.6"
59

610
services:
711

812
app:
913
build: .
10-
command: ./manage.py runserver 0.0.0.0:8000
14+
command: ./manage.py runserver 0.0.0.0:${PORT_APP}
1115
environment:
12-
- DJANGO_SETTINGS_MODULE=cc_legal_tools.settings.local
13-
# see Dockerfile
14-
image: cc_legal_tools
16+
- DJANGO_SETTINGS_MODULE
1517
ports:
16-
- "8005:8000"
18+
- "${PORT_APP}:${PORT_APP}"
1719
restart: always
1820
volumes:
1921
- .:/home/cc
20-
- ../cc-legal-tools-data:/home/cc-legal-tools-data
21-
22-
static:
23-
# https://hub.docker.com/_/httpd
24-
image: httpd:2.4-alpine
25-
command: /usr/local/apache2/conf/config/httpd-command.sh
26-
ports:
27-
- "8006:80"
28-
restart: always
29-
volumes:
30-
- ../cc-legal-tools-data/config:/usr/local/apache2/conf/config:ro
31-
- ../cc-legal-tools-data/docs/:/usr/local/apache2/htdocs:ro
22+
- ${RELPATH_DATA}:/home/cc-legal-tools-data

0 commit comments

Comments
 (0)