mirror of
https://github.com/mirego/accent.git
synced 2024-07-14 22:30:32 +03:00
Fix docker compose setup to build locally instead of using linux/amd64 arch everywhere
This commit is contained in:
parent
0d56ab1087
commit
d718fc0020
@ -103,13 +103,14 @@ The Makefile should be the main entry for common tasks such as tests, linting, D
|
||||
|
||||
For the production setup, we use Docker to build an OTP release of the app. With docker-compose, you can run the image locally. Here are the steps to have a working app running locally with Docker:
|
||||
|
||||
_When running the production env, you need to provide a valid GOOGLE_API_CLIENT_ID in the `docker-compose.yml` file._
|
||||
_When running the production env, you need to provide a valid authentication setup in the `environment` section in `docker-compose.yml` file._
|
||||
See the following sections to see available variables to enable third-party logins or dummy login (email only, no password).
|
||||
|
||||
1. Run `make build` to build the OTP release with Docker
|
||||
2. Run `make dev-start-postgresql` to start an instance of Postgresql. The instance will run on port 5432 with the `postgres` user. You can change those values in the `docker-compose.yml` file.
|
||||
3. Run `make dev-start-application` to start the app! The release hook of the release will execute migrations and seeds before starting the webserver on port 4000 (again you can change the settings in `docker-compose.yml`)
|
||||
|
||||
_That’s it! You now have a working Accent instance without installing Elixir or Node!_
|
||||
_That’s it! You now have a working Accent instance without installing Elixir or NodeJS!_
|
||||
|
||||
## 🌳 Environment variables
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
application:
|
||||
image: mirego/accent
|
||||
container_name: accent
|
||||
network_mode: "host"
|
||||
build: .
|
||||
ports:
|
||||
- 4000:4000
|
||||
@ -10,9 +10,9 @@ services:
|
||||
- postgresql
|
||||
environment:
|
||||
- PORT=4000
|
||||
- DATABASE_URL=postgres://postgres@postgresql:5432/accent_development
|
||||
- DATABASE_URL=postgres://postgres@localhost:5432/accent_development
|
||||
postgresql:
|
||||
image: postgres:10.3
|
||||
image: postgres:15.6
|
||||
container_name: accent-postgres
|
||||
environment:
|
||||
- POSTGRES_DB=accent_development
|
||||
|
Loading…
Reference in New Issue
Block a user