-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add prod compose and deploy (#49)
Signed-off-by: Grzegorz Choiński <[email protected]>
- Loading branch information
Showing
7 changed files
with
89 additions
and
47 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.vs/ | ||
.vscode/ | ||
|
||
.nginx/ | ||
.env |
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,37 @@ | ||
version: "3.7" | ||
|
||
services: | ||
kestrel: | ||
container_name: foodie | ||
image: "${DOCKER_REGISTRY}/${IMAGE_NAME}:${TAG}" | ||
depends_on: | ||
- db | ||
restart: always | ||
|
||
db: | ||
container_name: mssql_db | ||
user: root | ||
image: "mcr.microsoft.com/mssql/server" | ||
ports: | ||
- "1433:1433" | ||
environment: | ||
SA_PASSWORD: "Your_password123" | ||
ACCEPT_EULA: "Y" | ||
volumes: | ||
- mssql-data:/var/opt/mssql/data | ||
|
||
reverseproxy: | ||
image: nginx | ||
depends_on: | ||
- kestrel | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- ${PWD}/.nginx/fullchain.pem:${CERT_PATH} | ||
- ${PWD}/.nginx/privkey.pem:${CERT_KEY_PATH} | ||
- ${PWD}/.nginx/nginx.conf:/etc/nginx/nginx.conf:ro | ||
|
||
volumes: | ||
mssql-data: | ||
driver: local |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
FROM nginx:latest | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY localhost.crt /etc/ssl/certs/localhost.crt | ||
COPY localhost.key /etc/ssl/private/localhost.key | ||
RUN apt-get update | ||
RUN apt-get install -y certbot python3-certbot-nginx |
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,15 @@ | ||
#!/bin/bash | ||
|
||
rm -rf .env | ||
echo TAG=$TAG >> .env | ||
echo IMAGE_NAME=$IMAGE_NAME >> .env | ||
echo DOCKER_REGISTRY=$DOCKER_REGISTRY >> .env | ||
echo CERT_PATH=$CERT_PATH >> .env | ||
echo CERT_KEY_PATH=$CERT_KEY_PATH >> .env | ||
|
||
rm -rf .nginx | ||
mkdir .nginx | ||
cd .nginx | ||
echo "$PRIVATE_KEY" > privkey.pem | ||
echo "$CERTIFICATE" > fullchain.pem | ||
echo "$NGINX_CONF" > nginx.conf |