-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finalize the dockerfiles with volume exposure
- Loading branch information
Showing
8 changed files
with
252 additions
and
117 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
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/bash | ||
set -e | ||
|
||
|
||
if [ "$1" = 'api' ]; then | ||
source /app/venv/bin/activate | ||
cd /app/api | ||
exec ./bin/docker-entrypoint-api.sh | ||
elif [ "$1" = 'worker' ]; then | ||
source /app/venv/bin/activate | ||
cd /app/api | ||
exec ./bin/docker-entrypoint-worker.sh | ||
elif [ "$1" = 'beat' ]; then | ||
source /app/venv/bin/activate | ||
cd /app/api | ||
exec ./bin/docker-entrypoint-beat.sh | ||
elif [ "$1" = 'migrator' ]; then | ||
source /app/venv/bin/activate | ||
cd /app/api | ||
exec ./bin/docker-entrypoint-migrator.sh | ||
elif [ "$1" = 'web' ]; then | ||
node /app/web/web/server.js | ||
elif [ "$1" = 'space' ]; then | ||
node /app/space/space/server.js | ||
elif [ "$1" = 'admin' ]; then | ||
node /app/admin/admin/server.js | ||
else | ||
echo "Command not found" | ||
exit 1 | ||
fi |
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,73 @@ | ||
events { | ||
} | ||
|
||
http { | ||
sendfile on; | ||
|
||
server { | ||
listen 80; | ||
root /www/data/; | ||
access_log /var/log/nginx/access.log; | ||
|
||
client_max_body_size ${FILE_SIZE_LIMIT}; | ||
|
||
add_header X-Content-Type-Options "nosniff" always; | ||
add_header Referrer-Policy "no-referrer-when-downgrade" always; | ||
add_header Permissions-Policy "interest-cohort=()" always; | ||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||
add_header X-Forwarded-Proto "${dollar}scheme"; | ||
add_header X-Forwarded-Host "${dollar}host"; | ||
add_header X-Forwarded-For "${dollar}proxy_add_x_forwarded_for"; | ||
add_header X-Real-IP "${dollar}remote_addr"; | ||
|
||
location / { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:3001/; | ||
} | ||
|
||
location /spaces/ { | ||
rewrite ^/spaces/?$ /spaces/login break; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:3002/spaces/; | ||
} | ||
|
||
|
||
location /god-mode/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:3003/god-mode/; | ||
} | ||
|
||
location /api/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:8000/api/; | ||
} | ||
|
||
location /auth/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:8000/auth/; | ||
} | ||
|
||
location /${BUCKET_NAME}/ { | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade ${dollar}http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_set_header Host ${dollar}http_host; | ||
proxy_pass http://localhost:9000/uploads/; | ||
} | ||
} | ||
} |
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,14 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Variables | ||
set -o allexport | ||
source plane.env set | ||
set +o allexport | ||
|
||
PGHOST=localhost | ||
|
||
sudo -u postgres /usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl -D /var/lib/postgresql/data start | ||
sudo -u postgres /usr/lib/postgresql/${POSTGRES_VERSION}/bin/psql --command "CREATE USER $POSTGRES_USER WITH SUPERUSER PASSWORD '$POSTGRES_PASSWORD';" && \ | ||
sudo -u postgres /usr/lib/postgresql/${POSTGRES_VERSION}/bin/createdb -O $POSTGRES_USER $POSTGRES_DB && \ | ||
sudo -u postgres /usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl -D /var/lib/postgresql/data stop |
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,12 @@ | ||
# PostgreSQL configuration file | ||
|
||
# Allow connections from any IP address | ||
listen_addresses = '*' | ||
|
||
# Set the maximum number of connections | ||
max_connections = 100 | ||
|
||
# Set the shared buffers size | ||
shared_buffers = 128MB | ||
|
||
# Other custom configurations can be added here |
Oops, something went wrong.