chore: move compose.yml to its own directory

This commit is contained in:
CyberL1 2025-01-10 08:13:36 -05:00
parent 275a43fc18
commit b1cfeea4c3
4 changed files with 19 additions and 18 deletions

View File

@ -1,18 +0,0 @@
name: code-containers
services:
server:
build: .
ports:
- 3000:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
proxy:
build: proxy
env_file: .env
ports:
- 80:80
volumes:
- ./proxy/proxy.conf.template:/etc/nginx/conf.d/proxy.conf.template
network_mode: host
command: /bin/sh -c "sed 's/{PROXY_DOMAIN}/$PROXY_DOMAIN/' /etc/nginx/conf.d/proxy.conf.template > /etc/nginx/conf.d/proxy.conf && nginx -g 'daemon off;'"

16
compose/compose.yml Normal file
View File

@ -0,0 +1,16 @@
name: code-containers
services:
server:
build: ..
env_file: ../.env
ports:
- 3000:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
proxy:
build: ../proxy
env_file: ../.env
ports:
- 80:80
network_mode: host

View File

@ -3,3 +3,6 @@ FROM openresty/openresty:alpine
RUN wget -O /usr/local/openresty/lualib/resty/http.lua https://github.com/ledgetech/lua-resty-http/raw/refs/heads/master/lib/resty/http.lua
RUN wget -O /usr/local/openresty/lualib/resty/http_connect.lua https://github.com/ledgetech/lua-resty-http/raw/refs/heads/master/lib/resty/http_connect.lua
RUN wget -O /usr/local/openresty/lualib/resty/http_headers.lua https://github.com/ledgetech/lua-resty-http/raw/refs/heads/master/lib/resty/http_headers.lua
COPY proxy.conf etc/nginx/conf.d/proxy.conf
ENTRYPOINT ["/bin/sh", "-c", "sed -i \"s/{PROXY_DOMAIN}/$PROXY_DOMAIN/\" etc/nginx/conf.d/proxy.conf && nginx -g 'daemon off;'"]