Skip to content

Commit

Permalink
use the docker compose command field
Browse files Browse the repository at this point in the history
  • Loading branch information
elhmn committed Aug 10, 2024
1 parent 1d4f34c commit 39f6151
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
#find a way to tear this down after the init scripts has worked
setup-meilisearch:
image: ghcr.io/osscameroon/osscameroon-website-meilisearch-setup:6b4149a579ebcfe8508ebc832a2265e33c65d13c
command: ["/wait-for-it/wait-for-it.sh", "meilisearch:7700", "--", "make", "run-with-emulator"]
build: ./tools/meilisearch-index-generator/
command: ["/wait-for-it/wait-for-it.sh", "meilisearch:7700", "--", "make", "run"]
depends_on:
- meilisearch
environment:
Expand Down
2 changes: 2 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ RUN yarn build

FROM flashspys/nginx-static
RUN apk update && apk upgrade
RUN rm /etc/nginx/conf.d/default.conf
COPY --from=0 /code/nginx-custom.conf /etc/nginx/conf.d/default.conf
COPY --from=0 /code/build /static
10 changes: 10 additions & 0 deletions frontend/nginx-custom.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
server {
charset utf-8;
listen 80;
server_name localhost;
location / {
root /static;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
}
14 changes: 0 additions & 14 deletions tools/meilisearch-index-generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,10 @@ RUN apt update && apt install git gcc curl procps lsof -y

RUN apt install make

# Create appuser
ENV USER=user
ENV UID=10001

RUN adduser \
--disabled-password \
--gecos "" \
--shell "/sbin/nologin" \
--uid "${UID}" \
"${USER}"

WORKDIR /app

ADD ./requirements.txt ./

RUN pip install --no-cache-dir -r requirements.txt

COPY . /app

# set user to `user`
CMD ["python", "-m", "app.cli"]
5 changes: 0 additions & 5 deletions tools/meilisearch-index-generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ install-deps: venv
##run: run the indexer
## example: make run
run: install-deps
GOOGLE_APPLICATION_CREDENTIALS=.secrets/service-account.json $(PYTHON) -m app.cli

##run-with-emulator: to run the indexer with the gcloud datastore emulator
## example: make run-with-emulator
run-with-emulator: install-deps
$(PYTHON) -m app.cli

lint: venv
Expand Down

0 comments on commit 39f6151

Please sign in to comment.