-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.eas-celery
29 lines (22 loc) · 1.15 KB
/
Dockerfile.eas-celery
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Sensible defaults, but they will be explicitly overridden in the context of a buildspec anyway.
# The only one that needs to be passed in however is the ECS_ACCOUNT_NUMBER, as this changes per environment.
ARG ECS_ACCOUNT_NUMBER
ARG RESOURCE_PREFIX=eas-app
ARG AWS_REGION=eu-west-2
ARG BASE_VERSION=latest
FROM ${ECS_ACCOUNT_NUMBER}.dkr.ecr.${AWS_REGION}.amazonaws.com/${RESOURCE_PREFIX}-base:${BASE_VERSION}
ENV SERVICE='celery'
# Create root directory and copy repo
COPY . $DIR_API
# Download the database certificate
RUN wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem -O /etc/ssl/certs/global-bundle.pem && \
update-ca-certificates
# Build emergency-alerts-api
RUN cd $DIR_API && . $VENV_API/bin/activate && python$PYTHON_VERSION -m pip install --upgrade pip wheel setuptools && python$PYTHON_VERSION -m pip install pycurl && make bootstrap
# Create a blank configuration file
RUN echo "" > $DIR_API/environment.sh
RUN useradd -ms /bin/bash easuser && chown -R easuser:easuser $DIR_API && chown -R easuser:easuser $DIR_UTILS
COPY scripts/link-test.sh /
COPY scripts/healthcheck.sh /
COPY scripts/start-celery.sh /
CMD bash /start-celery.sh