File tree Expand file tree Collapse file tree 3 files changed +32
-5
lines changed
Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ services:
1313
1414jobs :
1515 include :
16- - stage : build
16+ - stage : Build Backend
1717 script :
1818 - openssl aes-256-cbc -K $encrypted_3c84dcdc6bbe_key -iv $encrypted_3c84dcdc6bbe_iv -in .env.enc -out .env -d
1919 # login to github registry
2222 - docker build -t docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest . -f backend.Dockerfile
2323 # push image
2424 - docker push docker.pkg.github.com/seluj78/pymatcha/pymatcha-api:latest
25- - stage : test
25+ - stage : Build Frontend
26+ script :
27+ - openssl aes-256-cbc -K $encrypted_3c84dcdc6bbe_key -iv $encrypted_3c84dcdc6bbe_iv -in .env.enc -out .env -d
28+ # login to github registry
29+ - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com
30+ # build image
31+ - docker build -t docker.pkg.github.com/seluj78/pymatcha/pymatcha-frontend:latest . -f frontend.Dockerfile
32+ # push image
33+ - docker push docker.pkg.github.com/seluj78/pymatcha/pymatcha-frontend:latest
34+ - stage : Build Workers
35+ script :
36+ - openssl aes-256-cbc -K $encrypted_3c84dcdc6bbe_key -iv $encrypted_3c84dcdc6bbe_iv -in .env.enc -out .env -d
37+ # login to github registry
38+ - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker.pkg.github.com
39+ # build image
40+ - docker build -t docker.pkg.github.com/seluj78/pymatcha/pymatcha-workers:latest . -f workers.Dockerfile
41+ # push image
42+ - docker push docker.pkg.github.com/seluj78/pymatcha/pymatcha-workers:latest
43+ - stage : Test API
2644 before_script :
2745 - node --version
2846 - npm --version
5371 # stop and remove docker to prevent them from block port at next iteration/test
5472 - docker stop $(docker ps -a -q)
5573 - docker rm $(docker ps -a -q)
56- - stage : lint
74+ - stage : Lint Backend
5775 before_script :
5876 - pip install -r backend/requirements.txt
5977 script :
Original file line number Diff line number Diff line change @@ -38,10 +38,9 @@ services:
3838 container_name : workers
3939 build :
4040 context : .
41- dockerfile : backend .Dockerfile
41+ dockerfile : workers .Dockerfile
4242 env_file :
4343 - .env.docker
44- entrypoint : celery worker --workdir . -A PyMatcha.celery -B --loglevel=info
4544 volumes :
4645 - backend:/backend
4746 depends_on :
Original file line number Diff line number Diff line change 1+ FROM python:3.8.3-buster
2+ WORKDIR /www
3+ ADD backend/requirements.txt .
4+ RUN pip install -r requirements.txt
5+ ADD backend .
6+ ENV PYTHONDONTWRITEBYTECODE 1
7+ EXPOSE 5000
8+ ADD .env .
9+ RUN export $(cat .env | xargs)
10+ CMD celery worker --workdir . -A PyMatcha.celery -B --loglevel=info
You can’t perform that action at this time.
0 commit comments