-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor (infra): Changes the strategy for deploying, removes traefik…
… and uses nginx-proxy. The previous strategy had traefik and nginx (nginx just serving the static files).
- Loading branch information
1 parent
8e5489e
commit d02180c
Showing
12 changed files
with
171 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
client_max_body_size 100m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
server { | ||
listen 80 default_server; | ||
root /usr/share/nginx/static; | ||
|
||
location /static { | ||
alias /usr/share/nginx/static; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: "3.3" | ||
|
||
services: | ||
redis: | ||
image: "redis" | ||
ports: | ||
- "${REDIS_PORT}:${REDIS_PORT}" | ||
command: redis-server --requirepass ${REDIS_PASSWORD} --replicaof no one --replica-read-only no | ||
volumes: | ||
- cache:/data | ||
networks: | ||
- shared | ||
|
||
volumes: | ||
cache: | ||
|
||
networks: | ||
shared: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3.3" | ||
|
||
services: | ||
redis: | ||
image: "redis" | ||
ports: | ||
- "${REDIS_PORT}:${REDIS_PORT}" | ||
command: redis-server --requirepass ${REDIS_PASSWORD} --replicaof no one --replica-read-only no | ||
volumes: | ||
- cache:/data | ||
networks: | ||
- shared | ||
|
||
db: | ||
image: postgres:16-alpine | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
ports: | ||
- "${SQL_PORT}:${SQL_PORT}" | ||
command: -p ${SQL_PORT} | ||
environment: | ||
POSTGRES_PASSWORD: ${SQL_PASSWORD} | ||
POSTGRES_USER: ${SQL_USER} | ||
POSTGRES_DB: ${SQL_DATABASE} | ||
networks: | ||
- shared | ||
|
||
volumes: | ||
cache: | ||
postgres_data: | ||
|
||
networks: | ||
shared: | ||
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
echo "Creating the shared network..." | ||
docker network create shared | ||
|
||
echo "Starting nginx-proxy..." | ||
docker run --detach \ | ||
--name nginx-proxy \ | ||
--publish 80:80 \ | ||
--publish 443:443 \ | ||
--volume certs:/etc/nginx/certs \ | ||
--volume vhost:/etc/nginx/vhost.d \ | ||
--volume html:/usr/share/nginx/html \ | ||
--volume /var/run/docker.sock:/tmp/docker.sock:ro \ | ||
--volume ./infra/nginx/conf.d/custom_proxy.conf:/etc/nginx/conf.d/custom_proxy.conf \ | ||
--volume ./infra/nginx/conf.d/fallback_server.conf:/etc/nginx/conf.d/fallback_server.conf \ | ||
--volume staticfiles:/usr/share/nginx/static \ | ||
--network shared \ | ||
nginxproxy/nginx-proxy | ||
|
||
echo "Starting nginx-proxy-acme..." | ||
docker run --detach \ | ||
--name nginx-proxy-acme \ | ||
--volumes-from nginx-proxy \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock:ro \ | ||
--volume acme:/etc/acme.sh \ | ||
--env "[email protected]" \ | ||
--network shared \ | ||
nginxproxy/acme-companion |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.