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 9, 2024
1 parent 1d4f34c commit 9616b1b
Show file tree
Hide file tree
Showing 4 changed files with 118 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
116 changes: 116 additions & 0 deletions frontend/nginx-custom.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}
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 9616b1b

Please sign in to comment.