-
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.
Updated README with better setup instrucions
- Loading branch information
Showing
1 changed file
with
68 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,76 @@ | ||
# Devops | ||
# PhoenixLAN Fullstack utvikling | ||
|
||
Docker-setup for å utvikle Phoenix-nettsiden fullstack fra pcen din | ||
Docker-setup for å sette opp ett lokalt fullstack environment for å utvikle de ulike Phoenix tjenestene fra pcen din. | ||
|
||
## Oppstart | ||
# Oppstarts-Krav | ||
|
||
### Krav | ||
- [Git](https://git-scm.com/download/win) | ||
- [GitHub CLI](https://cli.github.com/) (for å lett sette opp git ssh) | ||
- Du trenger Docker og tilhørende docker verktøyer | ||
|
||
Last ned Docker: | ||
**UDATERT** | ||
- Last ned [Docker Desktop](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe) | ||
- Last ned [node](https://nodejs.org/en) og [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable) | ||
|
||
* Windows: [Docker Desktop](https://hub.docker.com/editions/community/docker-ce-desktop-windows) | ||
- You need virtualization enabled on your system | ||
- You need 64-bit Windows 10 Pro, Enterprise, or Educational | ||
- Enable linux containers. You should be asked about this during setup. | ||
- Enable beta features | ||
- _For more information about Windows requirements, see [https://docs.docker.com/docker-for-windows/install/](https://docs.docker.com/docker-for-windows/install/)_ | ||
* Macos: [Docker Dekstop](https://hub.docker.com/editions/community/docker-ce-desktop-mac/) | ||
* Linux: Depends on distribution - look up what the Docker package is called in your package manager. Usually `docker`. | ||
### Oppsett | ||
|
||
You also need docker-compose. On Windows and Macos, this should be bundled with Docker Desktop. On linux, you have to find out what the package name is yourself. It is usually something like `docker-compose` | ||
- (Mye av denne prosessen vil forhåpentligvis automatiseres i fremtiden) | ||
- Lag en prosjektmappe (her kalt phoenixbackend) | ||
- Git clone følgende repoer (med ssh) inne i denne mappen | ||
|
||
### Running the application | ||
- git@github.com:phoenixlan/fullstack.git | ||
- git@github.com:phoenixlan/phoenixapi-v1.git | ||
- git@github.com:phoenixlan/phoenixcheckin-v1.git | ||
- git@github.com:phoenixlan/phoenixcrew-v1.git | ||
- git@github.com:phoenixlan/phoenixinfo-v1.git | ||
- git@github.com:phoenixlan/phoenixjs.git | ||
- git@github.com:phoenixlan/phoenixmain-v1.git | ||
- git@github.com:phoenixlan/phoenixparticipate-v1.git | ||
- Du skal da ende opp med denne filstrukturen: | ||
|
||
`cd` into the `development` folder and run `docker-compose up` | ||
``` | ||
+---phoenixbackend | ||
| +---fullstack | ||
| +---phoenixapi-v1 | ||
| +---phoenixcheckin-v1 | ||
| +---phoenixcrew-v1 | ||
| +---phoenixinfo-v1 | ||
| +---phoenixjs | ||
| +---phoenixmain-v1 | ||
| +---phoenixparticipate-v1 | ||
``` | ||
- Legg til følgende filer i `fullstack/phoenix-development` mappen: | ||
|
||
``` | ||
// .env | ||
JWT_SECRET="test123!" | ||
VIPPS_CLIENT_ID= | ||
VIPPS_CLIENT_SECRET== | ||
VIPPS_SUBSCRIPTION_KEY= | ||
VIPPS_CALLBACK_URL=https://api.test.phoenix.no/hooks/vipps | ||
VIPPS_MERCHANT_SERIAL_NUMBER= | ||
STRIPE_API_KEY= | ||
STRIPE_ENDPOINT_SECRET= | ||
``` | ||
``` | ||
// .db_env | ||
POSTGRES_PASSWORD=example | ||
POSTGRES_USER=phoenix | ||
DB_HOST=db | ||
``` | ||
``` | ||
// .mailgun_env | ||
MAILGUN_DOMAIN= | ||
MAILGUN_API= | ||
MAILGUN_API_KEY= | ||
MAILGUN_FROM_EMAIL= | ||
``` | ||
- Kjør `yarn` i alle node repoene for å installere de nødvendige node modulene. | ||
|
||
- (I phoenixjs må du også kjøre `yarn build`) | ||
- Gå til `/fullstack/phoenix-development` og kjør `docker-compose up` for å starte docker containerne. | ||
- Fullstack development enviornment skal da være oppe og du kan så gå til f.eks. [http://dev.phoenixlan.no:3000/]() |