Skip to content

Commit

Permalink
Updated README with better setup instrucions
Browse files Browse the repository at this point in the history
  • Loading branch information
simsine committed Mar 19, 2023
1 parent f0d71cf commit 3501194
Showing 1 changed file with 68 additions and 17 deletions.
85 changes: 68 additions & 17 deletions README.md
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/]()

0 comments on commit 3501194

Please sign in to comment.