Skip to content

Commit 9a79aee

Browse files
committedFeb 5, 2023
Provide ENV variables for frontned image
1 parent 7d6a878 commit 9a79aee

File tree

9 files changed

+25
-23
lines changed

9 files changed

+25
-23
lines changed
 

‎.github/workflows/ci-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
mv django.env.sample django.env &&
1111
mv postgres.env.sample postgres.env &&
1212
mv mbtiles.env.sample mbtiles.env &&
13+
mv frontend.env.sample frontend.env &&
1314
touch auth.env
1415
- env:
1516
SERVICE_KEY_BASE64: ${{ secrets.SERVICE_KEY_BASE64 }}

‎.github/workflows/python-image.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Python Image
2+
on: workflow_dispatch
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
# build
8+
- uses: actions/checkout@v3
9+
- run: make python-image
10+
# deploy
11+
- name: Docker Hub login
12+
uses: docker/login-action@v2
13+
with:
14+
username: ${{ secrets.DOCKER_USER }}
15+
password: ${{ secrets.DOCKER_PASSWORD }}
16+
- name: Docker push
17+
run: make push-python

‎.github/workflows/system-image.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ jobs:
66
steps:
77
# build
88
- uses: actions/checkout@v3
9-
- run: >
10-
mv django.env.sample django.env &&
11-
mv postgres.env.sample postgres.env &&
12-
mv mbtiles.env.sample mbtiles.env &&
13-
touch auth.env
14-
- env:
15-
SERVICE_KEY_BASE64: ${{ secrets.SERVICE_KEY_BASE64 }}
16-
run: echo "${SERVICE_KEY_BASE64// /}" | base64 --decode > config/firebase.json
179
- run: make system-image
1810
# deploy
1911
- name: Docker Hub login

‎docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ services:
5757
depends_on:
5858
- nginx
5959
image: chronmaps/frontend:release-prod
60+
env_file:
61+
- frontend.env
62+
6063
celery:
6164
depends_on:
6265
- redis

‎docker/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM chronmaps/backend:deps-python as python
22

3-
LABEL maintainer="Mikhail Orlov <miklergm@gmail.com>"
4-
53
RUN mkdir /config /src
64

75
COPY ./project /src

‎docker/Dockerfile.base

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM python:3.9.10-alpine3.15 as base
22
# chronmaps/backend:deps-base
33

4-
LABEL maintainer="Mikhail Orlov <miklergm@gmail.com>"
5-
64
ENV PYTHONUNBUFFERED=1 \
75
PYTHONDONTWRITEBYTECODE=1 \
86
PYTHONFAULTHANDLER=1 \

‎docker/Dockerfile.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM chronmaps/backend:deps-base as base
22
# chronmaps/backend:deps-build
33

4-
LABEL maintainer="Mikhail Orlov <miklergm@gmail.com>"
5-
64
RUN set -ex \
75
&& apk add --no-cache \
86
postgresql-dev linux-headers pcre-dev gcc musl-dev libffi-dev alpine-sdk libressl zlib-dev jpeg-dev \

‎docker/Dockerfile.python

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
FROM chronmaps/backend:deps-build as build
22
# chronmaps/backend:deps-python
33

4-
LABEL maintainer="Mikhail Orlov <miklergm@gmail.com>"
5-
64
RUN pip install "poetry==$POETRY_VERSION"
75

86
WORKDIR $PYSETUP_PATH
97
COPY pyproject.toml poetry.lock ./
108
RUN poetry install
119

12-
# TODO: create dev stage that runs linting etc, --no-dev in production
13-
14-
FROM chronmaps/backend:deps-base as prod
15-
16-
COPY --from=build $VENV_PATH $VENV_PATH
17-
COPY --from=build $PYSETUP_PATH/pyproject.toml $PYSETUP_PATH/poetry.lock ./
18-
1910
ENTRYPOINT /bin/sh

‎frontend.env.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FLAGS_CONFIG_BASE64="e30K"
2+
ANALYTICS_CONFIG_BASE64="eyAieW0iOiAiIiwgImdhIjogIiIgfQo="
3+
MAPBOX_CONFIG_BASE64=""
4+
FIREBASE_CONFIG_BASE64=""

0 commit comments

Comments
 (0)