Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize #246

Merged
merged 7 commits into from
Aug 29, 2023
Merged

Dockerize #246

merged 7 commits into from
Aug 29, 2023

Conversation

eritbh
Copy link
Member

@eritbh eritbh commented Aug 23, 2023

Prepares the bot to run in Docker. Converts all our configuration to be handled through environment variables rather than a config file, since Docker plays nicer with that. Adds a Dockerfile for an image which hosts the backend on port 8080, and a workflow to automatically build the image and publish it to the Github container registry so we can pull from there for deployments. See also r-anime/misato-frontend#14.

@eritbh eritbh requested a review from a team as a code owner August 23, 2023 07:57
@eritbh eritbh added devops Related to CI/CD pipeline meta Related to the project itself labels Aug 23, 2023
@eritbh
Copy link
Member Author

eritbh commented Aug 23, 2023

Suggested nginx config to adapt to this and the frontend both being in their own containers (this still needs to be tested):

server {
	server_name discord.r-anime.moe;
	listen 80;

	location = /.well-known/security.txt {
		# ...
	}
	location ~ ^(api|auth)/ {
		# use whatever port the backend container's 8080 is mapped to
		proxy_pass http://localhost:8081;
	}
	location / {
		# use whatever port the frontend container's 8080 is mapped to
		proxy_pass http://localhost:8082;
	}
}

@eritbh eritbh merged commit caa8eb5 into main Aug 29, 2023
@eritbh eritbh deleted the dockerize branch August 29, 2023 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Related to CI/CD pipeline meta Related to the project itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant